Android Color Parse parseHexColor(String colorStr)

Here you can find the source of parseHexColor(String colorStr)

Description

parse Hex Color

Declaration

public static Integer parseHexColor(String colorStr) 

Method Source Code

//package com.java2s;

public class Main {
    public static Integer parseHexColor(String colorStr) {
        Integer color = null;/*  w ww  .ja v a2 s  . com*/
        try {
            color = new Integer((int) Long.parseLong(colorStr, 16));
        } catch (NumberFormatException e) {
        }
        return color;
    }
}

Related

  1. parseColor(String inColor)
  2. parseColor(String colorName)
  3. toARGB(String colorString)
  4. toARGB(int alpha, int red, int green, int blue)