Here you can find the source of getRGB(java.awt.Color color)
public static float[] getRGB(java.awt.Color color)
//package com.java2s; public class Main { public static float[] getRGB(java.awt.Color color) { int r = color.getRed(); int g = color.getGreen(); int b = color.getBlue(); //System.out.println(r+"\t"+g+"\t"+b); float[] rgb = new float[] { (float) (r / 255.), (float) (g / 255.), (float) (b / 255.) }; return rgb; }//from w ww. jav a 2s . co m }