FineFindus / eyedropper

Pick and format colors
https://apps.gnome.org/Eyedropper
GNU General Public License v3.0
260 stars 26 forks source link

Support "nearest named color" #145

Open Lehmanator opened 2 months ago

Lehmanator commented 2 months ago

Is your feature request related to a problem? Please describe.

I am colorblind.

In order to supplement my inability to determine colors, I often use color pickers to determine the color of something. Normally, I rely on my ability to mentally compute/translate RGB or hex values into some approximate color name. However, I'm not always great at this, and would often wish I was given a color name somewhat close to the actual color value.

Describe the solution you'd like

Nearest Named Color

This could behave similarly to the existing "Name" color format.

But when the color does not exactly match a name, it would return either the closest named color or a list of named colors ordered by distance from the user's color to that named color.

A simple implementation of distance would probably be good enough for my desired use case.

Something like: sqrt(r^2 + g^2 + b^2)

Possible UI could be one of:

Might also be nice to output the distances and/or raw component differences between the user color and named color(s) in addition to the color name(s).

Or if a color matches some RGB / HSL value in all components besides one, output something like:

Display UI Widgets for Color Formats

Basically include a typical RGB / HSL color picker widget alongside the format display. Seeing where a value exists in color space is also helpful for determining colors.

These widgets could be used purely for display, or they could implement interactivity to double as a UI for users to pick a new color.

This would probably require some additional work to adjust the UI for the new widgets, since picker widgets would be taller than the current text field rows.

Additional functionality could be implemented to also plot the color against its nearest named colors / other palette values on like tints, shades, and complementary on the same widget, which would also be desirable.

Describe alternatives you've considered

None.

Additional context

Just listing the nearest color would be nice to have, but additional context or information display would make the feature more useful.

A feature like this would be huge for me and other colorblind users, and I think users with normal color vision would probably find this useful too.