flex_color_picker icon indicating copy to clipboard operation
flex_color_picker copied to clipboard

Add a Named Color Picker

Open LefebvreIlyas opened this issue 3 years ago • 2 comments

Hi @rydmike ,

A huge thank you for this package, it is extremely complete.

Just a small suggestion, the possibility to choose a color among the 1566 named colors in the form of a list or a grid with the possibility to research.

Have a nice day

LefebvreIlyas avatar Sep 14 '21 21:09 LefebvreIlyas

Hi @LefebvreIlyas, I like it, that's a cool idea! 😎

A list with color+name and a search bar might work, you could scroll and pick or search/filter by name too, perhaps a toggle view to a smaller small/tight grid view as well where you can see more colors at once and still filter by name, but names are not shown (maybe as tooltips). Any other suggestions? How do you see it working ideally?

The "Name That Color" algorithm applies the same color name to many similar colors, by finding the named color with the color value "closest" to a given color value. Picking a given color name could return the exact color definition for the named color from this list: https://github.com/rydmike/flex_color_picker/blob/38337d1cdfdb150f57ce6f831fb7c0fe270989b4/lib/src/color_tools.dart#L821

BTW I did not come up the original color names and codes, it came as mentioned in the source from this project: https://chir.ag/projects/ntc/

And glad to hear you like the package, it is due for some updates and more features, this could certainly be one of them.

rydmike avatar Sep 14 '21 21:09 rydmike

Cool! 😀

Your proposal is very good, that's what I had in mind, the tooltips seem to me a very good idea.

As a suggestion I could say:

  • Allow the configuration of the tile spacing and tile run spacing.
  • Allow the display of the hexadecimal code in addition to the color name.
  • When the developer specifies an initial color or the user chooses a color and it doesn't 100% match a named color, I think a symbol like ± or ≈ or something better should be added, I don't know (this suggestion is more general, it also applies to other pickers).
  • The list / or grid of the named color picker should be scrolled directly to the nearest named color (as all tiles have the same height it should not be very complicated to do, there is also this package to do that: https://pub.dev/packages/scrollable_positioned_list).
  • The tile of the selected color should be highlighted.
  • If the color does not match 100%, an additional click sets the selected color as the named color.

Don't forget the quality of the README.md and the demos which allow you to have an overview of the functionality and the degree of customization in an instant, it's really a great job!!

LefebvreIlyas avatar Sep 14 '21 22:09 LefebvreIlyas