Skip to content

Get Color Name #55

Answered by rydmike
TomasWard1 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Tomas @TomasWard1,

Thank you for your question. Yes there are functions for this. The FlexColorPicker exposes almost all of its internal color tools via APIs. See for example ColorTools:

https://pub.dev/documentation/flex_color_picker/latest/flex_color_picker/ColorTools-class.html#static-methods

With FlexColorPicker package imported, you can use the ColorTools static functions ColorTools.materialName and ColorTools.nameThatColor anywhere in your app on any Color value, without using the FlexColorPicker. You just pass them a Color and you get the String name back.

The FlexColorPicker uses these functions internally and provide them as exported tools as well. I use them and other color t…

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by rydmike
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #53 on October 06, 2022 13:07.