Java Color Create toColor(int rgba)

Here you can find the source of toColor(int rgba)

Description

to Color

License

Open Source License

Declaration

public static Color toColor(int rgba) 

Method Source Code

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

import java.awt.Color;

public class Main {
    public static Color toColor(int rgba) {
        int r = rgba & 0xFF, g = rgba >> 8 & 0xFF, b = rgba >> 16 & 0xFF, a = rgba >> 24 & 0xFF;
        return new Color(r, g, b, a);
    }//from  ww w  .j a v a2s  . c  om
}

Related

  1. toColor(byte[] bytes)
  2. toColor(final String hexColor)
  3. toColor(final String hexString)
  4. toColor(final String text, final Color defaultValue)
  5. toColor(float[] color)
  6. toColor(int x)
  7. toColor(Node n)
  8. toColor(short rgb565)
  9. toColor(String background)