本文介绍了如何在java中使用Color Chooser获取颜色名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想要从Color选择器中选择颜色的名称,但现在它返回R,G,B值。我想要颜色的名称以供进一步使用。任何人都可以帮助我吗?
I want name of the color which is selected from Color chooser but now it is returning me the R,G,B Values. I want the name of the color for further use.Can anybody help me?
推荐答案
对于更广泛的颜色列表你可以考虑解析像文件并匹配其中的条目。
For a slightly more extensive list of colours you could consider parsing something like the X11 rgb.txt file and matching to entries within that.
这篇关于如何在java中使用Color Chooser获取颜色名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!