Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support "nearest named color" #145

Open
Lehmanator opened this issue Jun 10, 2024 · 0 comments
Open

Support "nearest named color" #145

Lehmanator opened this issue Jun 10, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Lehmanator
Copy link

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:

  • Replace the existing "Name" row text field
  • Copy the existing "Name" row text field, but with the described behavior
  • Overlay the colored button that opens with the palette window with a label containing this info. The label would need to determine a text color with appropriate contrast.

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:

  • fuschia - darken(3%)
  • maroon - lighten(5%)
  • cyan - saturation(-2%)
  • beige - green(+10)

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.

@Lehmanator Lehmanator added the enhancement New feature or request label Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant