Java Color to RGB String toRGBA(Color c)

Here you can find the source of toRGBA(Color c)

Description

to RGBA

License

Mozilla Public License

Declaration

public static int toRGBA(Color c) 

Method Source Code


//package com.java2s;
//License from project: Mozilla Public License 

import java.awt.Color;

public class Main {
    public static int toRGBA(Color c) {
        return c.getRed() | c.getGreen() << 8 | c.getBlue() << 16 | c.getAlpha() << 24;
    }/*  w w  w .  j ava 2 s  .c om*/
}

Related

  1. toRGB(Color c)
  2. toRGB(Color color)
  3. toRGB(ColorSpace colorSpace, float... components)
  4. toRGB(int red, int green, int blue)
  5. toRGB565(Color c)
  6. toRGBFunctionCall(Color color)