Java RGB Color Create toRGBA(int color)

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

Description

to RGBA

License

Open Source License

Declaration

public static int[] toRGBA(int color) 

Method Source Code

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

public class Main {
    public static int[] toRGBA(int color) {
        int alpha = color >> 24 & 255;
        int red = color >> 16 & 255;
        int green = color >> 8 & 255;
        int blue = color & 255;

        return new int[] { red, green, blue, alpha };
    }/*  ww  w  .  ja v  a2 s.co m*/
}

Related

  1. toRgb(int r, int g, int b)
  2. toRGB(String hexString)
  3. toRGB15(int x)
  4. toRGBA(float[] colors)
  5. toRGBA(int argb)
  6. toRGBA(String hexARGB)
  7. toRGBAArray(int colorBuffer)
  8. toRGBAIntArray(long argb)
  9. toRgbText(int rgb)