+ public static float[] colorToLiteral(Color color) {
+ // BGRA float values out
+ return new float[] {
+ (float)color.getB() / 255,
+ (float)color.getG() / 255,
+ (float)color.getR() / 255,
+ 1.f,
+ };
+ }
+
+ public static Color literalToColor(float[] color) {
+ // BGRA float values in
+ return new Color((int) (color[2] * 255), (int) (color[1] * 255), (int) (color[0] * 255));
+ }
+