Java RGB Color Create getRGB(Color color)

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

Description

get RGB

License

Open Source License

Declaration

public static int getRGB(Color color) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.awt.Color;

public class Main {
    public static int getRGB(Color color) {
        return getRGB(color.getRed(), color.getGreen(), color.getBlue());
    }/*from  www . ja v a  2 s.  c o m*/

    public static int getRGB(float r, float g, float b) {
        return getRGB((int) (r * 255), (int) (g * 255), (int) (b * 255));
    }

    public static int getRGB(int r, int g, int b) {
        return (r & 0xFF) << 16 | (g & 0xFF) << 8 | (b & 0xFF);
    }
}

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(java.awt.Color color)
  6. makeIcon(int width, int height, int[] rgb)
  7. makeLinear_sRGBCM(boolean premult)
  8. makeRgbImage(int[][] rbgImage)