Skip to content

Create colorpicker module#4197

Open
RKBoss6 wants to merge 9 commits intoespruino:masterfrom
RKBoss6:color-picker
Open

Create colorpicker module#4197
RKBoss6 wants to merge 9 commits intoespruino:masterfrom
RKBoss6:color-picker

Conversation

@RKBoss6
Copy link
Contributor

@RKBoss6 RKBoss6 commented Mar 23, 2026

Creates colorpicker module as an easy way for apps to present users with a color selection menu.
I've been wanting a menu that could do this for a while, as the alternative before was to make a scroll menu with all the colors and have the users scroll through all of them, instead of being able to see them at a glance. Currently this only works on bangle.js 2, I'm not exactly sure how to convert it to bangle.js 1 as well. This can be used in places like clock_bg, where users need to select multiple colors, or even in the theme menu and other system-level places if the need arises.

This is my first module, so let me know if I need to do anything else or did something wrong :)

Single color mode:
d

Multi-select mode:
download (7)

You can look at an example implementation in the Clock Background app on my app loader, and just upload the module to your watch as colorpicker via web ide.

For bangle.js 1 compatibility, would the best course of action be to make the up/down buttons change the highlighted color, then a select is used to select it?

RKBoss6 added 3 commits March 23, 2026 09:28
Added documentation for the color picker module, including usage examples and options.
Added a period at the end of the module description and included an image.
Copilot AI review requested due to automatic review settings March 23, 2026 13:45
@RKBoss6 RKBoss6 marked this pull request as draft March 23, 2026 13:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new colorpicker module intended to provide a reusable, at-a-glance color selection UI for apps (targeted at Bangle.js 2 per PR description).

Changes:

  • Introduces modules/colorpicker.js implementing a grid-based color picker with optional full-screen preview.
  • Adds modules/colorpicker.md documenting usage and available options.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
modules/colorpicker.js New module that draws a color grid, handles touch/button input, and returns selected color via callback.
modules/colorpicker.md Documentation for integrating the module and configuring available options.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

RKBoss6 added 2 commits March 23, 2026 10:07
Refactor color picker logic to handle empty color options and improve haptic feedback.
Added previewTimeout variable to manage color preview timeout.
@RKBoss6 RKBoss6 marked this pull request as ready for review March 23, 2026 15:21
@RKBoss6 RKBoss6 marked this pull request as draft March 23, 2026 18:05
@RKBoss6 RKBoss6 marked this pull request as ready for review March 24, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants