Java examples for 2D Graphics:Color RGB
color To RGB
//package com.java2s; import java.awt.Color; public class Main { public static int[] colorToRGB(Color color) { int[] rgb = new int[3]; rgb[0] = color.getRed();/*w w w . jav a 2s .c o m*/ rgb[1] = color.getGreen(); rgb[2] = color.getBlue(); return rgb; } }