Java RGB Color Create rgbFromColorInt(int c)

Here you can find the source of rgbFromColorInt(int c)

Description

rgb From Color Int

License

Open Source License

Declaration

public final static int[] rgbFromColorInt(int c) 

Method Source Code

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

public class Main {
    public final static int[] rgbFromColorInt(int c) {
        return new int[] { redFromColorInt(c), greenFromColorInt(c), blueFromColorInt(c) };
    }/*from  w w  w  .j av  a 2  s . co  m*/

    public final static int redFromColorInt(int c) {
        return (c >> 16) & 0xFF;
    }

    public final static int greenFromColorInt(int c) {
        return (c >> 8) & 0xFF;
    }

    public final static int blueFromColorInt(int c) {
        return c & 0xFF;
    }
}

Related

  1. RGBAFromHEX(String stringValue)
  2. RGBAFromHSLA(float h, float s, float l, float a)
  3. rgbClamp(float c)
  4. rgbComponents(int argb)
  5. rgbDistance(int color1, int color2)
  6. rgbFromGrayscale(int grayscale)
  7. toRGB(byte r, byte g, byte b, byte a)
  8. toRGB(final int r, final int g, final int b, final int a)
  9. toRGB(float h, float s, float l)