Java RGB Color Create toRGB(int color)

Here you can find the source of toRGB(int color)

Description

to RGB

License

Apache License

Declaration

public static int[] toRGB(int color) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static int[] toRGB(int color) {
        int[] rgb = new int[3];
        toRGB(color, rgb);/*from   ww w .  j  a v a  2 s.c o  m*/
        return rgb;
    }

    public static void toRGB(int color, int[] rgb) {
        rgb[0] = (color >> 16) & 0xff;
        rgb[1] = (color >> 8) & 0xff;
        rgb[2] = (color >> 0) & 0xff;
    }
}

Related

  1. rgbFromGrayscale(int grayscale)
  2. toRGB(byte r, byte g, byte b, byte a)
  3. toRGB(final int r, final int g, final int b, final int a)
  4. toRGB(float h, float s, float l)
  5. toRGB(int alpha, int red, int green, int blue)
  6. toRgb(int r, int g, int b)
  7. toRGB(String hexString)
  8. toRGB15(int x)
  9. toRGBA(float[] colors)