Using Java, how do I convert a human readable color name into a three-element integer array?
For example, I have a color represented by:
int[] RGB_COLOR = {128,25,25};
And I want to be able to convert the static value Color.BLUE into a three-element integer array that is similar to the one above. Is this possible or do I have to hack my way around this?
Do you mean like this…
To convert a colour name to a Color you can use reflections, provided its own of the built in colours. If you want more colours you would need to use a map.