Java library to get color on behalf of color

java.awt.Color has a pair of specific colors - for example, Color.RED (or Color.red) is a public static value that returns Color(255, 0, 0). But there is only a limited set of colors defined - 13 in my account.

Are there any Java libraries that have colors in the HTML color scheme, so I can say something like ColorLibrary.AQUAMARINE and return # 60CC93? Or, even better, there are libraries that display the name in color, so what can I say Color color = ColorMap.get("aquamarine");?

+3
source share
1 answer

There are not many libraries that compiled a color name map for rgb / hex values, however there are several different libraries that provide functions for obtaining colors that are predefined by java.

See:

http://www.java2s.com/Tutorial/Java/0261__2D-Graphics/Convertsagivenstringintoacolor.htm

http://www.martiansoftware.com/jsap/doc/javadoc/com/martiansoftware/jsap/stringparsers/ColorStringParser.html

0
source

All Articles