Java - How to convert a Color.toString() into a Color?
colors, java
Solution
Using `toString()` "might vary between implementations." Instead save `String.valueOf(color.getRGB())` for later reconstruction.
Problem
In order to save Color attributes of a graphical object in my application, I saved the string representation of this Color in a data file. For instance, for red I save: `java.awt.Color[r=255,g=0,b=0]`. How can I convert this string representation into a Color so that I can use it again after loading my data file ? Thank you.