Java RGB Color Create getRGB(java.awt.Color color)

Here you can find the source of getRGB(java.awt.Color color)

Description

get RGB

License

Open Source License

Declaration

public static float[] getRGB(java.awt.Color color) 

Method Source Code

//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
}

Related

  1. cmykToRgb(float... cmyk)
  2. deformationToRGB(final double val, final double min, final double max)
  3. fromHtmlRGB(String rgb)
  4. fromRGB(String tag)
  5. getRGB(Color color)
  6. makeIcon(int width, int height, int[] rgb)
  7. makeLinear_sRGBCM(boolean premult)
  8. makeRgbImage(int[][] rbgImage)
  9. msAccesToRGBa(int code)