Page MenuHomePhabricator

Unified API: Color Selector Widget
Open, Incoming QueuePublic

Description

The unified API is currently missing a color selector. This widget is present in the legacy API, and allows users to specify a color via Hue/Saturation/Lightness/Alpha sliders or a pre-generated palette. This is less broadly useful than other missing widgets like the combo box (T8955), but is still useful in specific cases.

Proposals

I can see multiple ways that such a selector could be implemented. The first, and most complex, would be a hue circle containing a lightness/saturation triangle, with a slider/input for opacity and inputs for HSL/RGB. Gcolor2 provides a similar visualization, though in this case, the color name and eyedropper tool would be excluded:

Alternatively, a similar approach to the legacy API could be taken. Sliders could be used for HSL and opacity, along with a pregenerated palette and RGBA spinner buttons. Again, the eyedropper tool would be excluded:

I believe that the first approach is the ideal one, as components of it can be removed as desired by the developer. If opacity is unwanted, the slider and input can be removed. If only the hue circle and SL triangle is desired, everything else can be removed. However, as this is a proposal, I'd like feedback on what approach would be appropriate for EFL.

Related Objects

serebit created this task.Sep 15 2021, 10:36 AM