Here you can find the source of toColor(float[] color)
public static Color toColor(float[] color)
//package com.java2s; //License from project: Apache License import java.awt.Color; public class Main { public static Color toColor(float[] color) { if (color.length == 4) return new Color(color[0], color[1], color[2], color[3]); else/*from w w w.j a va2 s . c om*/ return new Color(color[0], color[1], color[2], 1); } }