Java examples for 2D Graphics:Color RGB
rgb To Color
//package com.java2s; import java.awt.Color; public class Main { public static void main(String[] argv) throws Exception { int[] rgb = new int[] { 34, 35, 36, 37, 37, 37, 67, 68, 69 }; System.out.println(rgbToColor(rgb)); }/* w ww . j av a2 s .c om*/ /** * */ public static Color rgbToColor(int[] rgb) { return new Color(rgb[0], rgb[1], rgb[2]); } }