List of usage examples for java.awt Color getRGBComponents
public float[] getRGBComponents(float[] compArray)
From source file:Main.java
public static void main(String[] args) { Color myColor = Color.RED; System.out.println(Arrays.toString(myColor.getRGBComponents(null))); }
From source file:org.kalypsodeegree_impl.graphics.displayelements.RasterDisplayElement_Impl.java
private Color shadeColor(final Color color, final double shade) { final float[] cc = color.getRGBComponents(null); for (int i = 0; i < 3; i++) cc[i] *= shade;/* w w w.j av a 2 s . c om*/ return new Color(cc[0], cc[1], cc[2], cc[3]); }