Updating the color picker

IMO the color picker in the app could be less complicated and more “direct”.
Currently I have to select the color and adjust one if the two sliders to actually get the selected color.

In a testing branch I replaced the old color picker by a new one. It has two modes: Presets and Custom. The user can switch between them, but “Presets” is always the default.

What do you think about this?

PS: I added black and white to the preset colors.


If possible, I would suggest a hybrid approach with the ability for users to define the presets. That would provide flexibility to have your favourite RGB values available quickly. You could also have a button to reset one or all of the presets to default values.


I haven’t found a color picker that has a slider for brightness, so I came up with my own color picker.

It sends the new color as soon as the user clicks on it and not just after closing the dialog. I’ll add an indicator which color is currently selected, but I don’t know how to add a picker for custom colors. Would you miss such?

1 Like

TBH, I do not yet see the advantage of that change. If we removed the saturation bar from the current dialog, its usage is by no means more complicated than the suggested alternative, but the existing picker has the advantage of providing a continuous color space instead of discrete colors only. At least I find that continuous color space useful for lighting applications.

I didn’t have color blubs for a long time, so I didn’t care much about the color picker. Now I used it for a few weeks and when I first used the color picker in the official Tradfri app it felt so much more comfortable.

If you want a specific color, you just press the suited button. And the slider makes sense to me: Left = 0%, right = 100% brightness.

While I understand the concept of HSV and thus the meaning of the two sliders in the current picker, it doesn’t feel intuitive. If I want to change from blue to warm white, I have to select yellow/orange and change the upper slider. And why is the lower slider 100% - 0% brightness and not the other way round.

I can think of a good compromise: Like the color picker in the first post, but my color picker as the preset one (a few white tones need to be added) and the old color picker as the custom one. And the picker remembers the last state (custom or preset).

I think your compromise is solid, but still feel there’s value in being able to define presets. Some of this comes from the fact that I’m red-green colourblind, so I have difficulty with a lot of colour pickers. It’s much better for me to get someone else’s input on the best lighting for my space and then be able to choose those settings easily. Short of that, I usually just rely on the presets and hope they work.

(you should see some of the Excel spreadsheets I’ve forced upon my coworkers)

Would there perhaps be a way to define the preset colours in the app settings using the original colour picker?

Here’s the color picker of the Hue app, which I find to be almost perfect:

The color space is continuous (including saturation control via the radius of the circle), there’s an additional brightness slider and it remembers the last used colors (at top left). I guess it’s just not trivial recreating that one…

Personally, I don’t like the Tradfri picker due to the lack of continuous color space either :-/ My living room ceiling light has a slightly different color calibration than all other Hue lights, so a color picker with presets only would effectively prevent me from getting the same-ish color on all lights.

Edit: Here’s a list of color picker libraries … number 1 looks great, numbers 2 and 5 also look usable for recreating the Hue picker.

1 Like

Color picker number 1 looks good to me. IMO It’s a good compromise between fixed colors and continuous color space.

I’ll give it a try. Probably with a custom dialog, so we can use the material slider for brightness.

1 Like

Which version do you prefer more?

+1 from me for the version with less dots.

+1 from me for the version with more dots :wink:

1 Like

Can you tell me is it my local bug or global?
Brightness slider in bottom of color picker returns NULL in Item when i move it. Previous version works like a charm.
I’m on beta version of Android APP - 2.12.16-beta

For me the color picker works as expected and I don’t see any commit changing something at the color picker recently. Can you open a GitHub issue?

Open the issue: https://github.com/openhab/openhab-android/issues/2002

Great work!
Can you share the code for the simple colour picker in your first screenshot. I’m really loving it. A simple approach!


Hey @fi8er1,
the color picker in the first two screenshots is https://github.com/jaredrummler/ColorPicker.