class Color extends AbstractCssProperty<Color> implements StateChangeInformer<Bean> {

    public static boolean isValid(final String cssValue) {

        if (cssValue == null) {
            return false;
        }

        final String trimmedCssValue = StringUtil.strip(cssValue);

        if (trimmedCssValue.isEmpty()) {
            return false;
        }

        final String trimmedCssValueLowerCase = TagStringUtil
                .toLowerCase(trimmedCssValue);

        if (INITIAL.equals(trimmedCssValueLowerCase)
                || INHERIT.equals(trimmedCssValueLowerCase)) {
            return true;
        }

        if (CssColorName.isValid(trimmedCssValue)) {
            return true;
        }

        if (RgbCssValue.isValid(trimmedCssValue)) {
            return true;
        }
        if (RgbaCssValue.isValid(trimmedCssValue)) {
            return true;
        }
        if (HslCssValue.isValid(trimmedCssValue)) {
            return true;
        }
        if (HslaCssValue.isValid(trimmedCssValue)) {
            return true;
        }

        try {
            if (trimmedCssValue.length() == 0
                    || trimmedCssValue.charAt(0) != '#') {
                return false;
            }
            final long value = Long.parseLong(trimmedCssValue.substring(1), 16);

            return !(value > CommonConstants.FFFFFFFF_HEX_VALUE || value < 0);
        } catch (final NumberFormatException ex) {
        }

        return false;
    }

    public  Color();
    public  Color(final String cssValue);
    public  Color(final Color color);
    public  Color(final CssColorName cssColorName);
    public  Color(final RgbCssValue rgbCssValue);

}