is Hexadecimal Color - Android Graphics

Android examples for Graphics:Color Operation

Description

is Hexadecimal Color

Demo Code


//package com.java2s;

public class Main {
    private static boolean isHexadecimalColor(String colorString) {
        try {/* w w  w . j  a va 2  s  . c  om*/
            Long.parseLong(colorString.substring(1), 16);
            return true;
        } catch (NumberFormatException e) {
            return false;
        }
    }
}

Related Tutorials