Color.getRGBColorComponents(float[] compArray) has the following syntax.
public float[] getRGBColorComponents(float[] compArray)
In the following code shows how to use Color.getRGBColorComponents(float[] compArray) method.
//from w w w . jav a2 s . c om import java.awt.Color; import java.util.Arrays; public class Main { public static void main(String[] args) { Color myColor = Color.RED; System.out.println(Arrays.toString(myColor.getRGBColorComponents(null))); } }
The code above generates the following result.