(String value)
| 46 | * Guesses what format the input color is in. |
| 47 | */ |
| 48 | public static Color fromString(String value) { |
| 49 | for (Converter converter : CONVERTERS) { |
| 50 | Color color = converter.getColor(value); |
| 51 | if (color != null) { |
| 52 | return color; |
| 53 | } |
| 54 | } |
| 55 | throw new IllegalArgumentException( |
| 56 | String.format("Did not know how to convert %s into color", value)); |
| 57 | } |
| 58 | |
| 59 | public Color(int red, int green, int blue, double alpha) { |
| 60 | this.red = red; |