Android Color Parse toARGB(int alpha, int red, int green, int blue)

Here you can find the source of toARGB(int alpha, int red, int green, int blue)

Description

to ARGB

License

Open Source License

Parameter

Parameter Description
alpha [0..255]
red [0..255]
green [0..255]
blue [0..255]

Return

the calculated argb value

Declaration

public static int toARGB(int alpha, int red, int green, int blue) 

Method Source Code

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

public class Main {
    /**//from  w ww  . j ava2  s  .  co m
     * @param alpha
     *            [0..255]
     * @param red
     *            [0..255]
     * @param green
     *            [0..255]
     * @param blue
     *            [0..255]
     * @return the calculated argb value
     */
    public static int toARGB(int alpha, int red, int green, int blue) {
        return android.graphics.Color.argb(alpha, red, green, blue);
    }

    /**
     * @param colorString
     *            #RRGGBB or #AARRGGBB or... read
     *            {@link Color#parseColor(String)}
     * @return
     */
    public static int toARGB(String colorString) {
        return android.graphics.Color.parseColor(colorString);
    }
}

Related

  1. parseColor(String inColor)
  2. parseColor(String colorName)
  3. parseHexColor(String colorStr)
  4. toARGB(String colorString)