protected function initColor($color, $default)
    {
        if ($color == null) {
            return new Securimage_Color($default);
        } else if (is_string($color)) {
            try {
                return new Securimage_Color($color);
            } catch(Exception $e) {
                return new Securimage_Color($default);
            }
        } else if (is_array($color) && sizeof($color) == 3) {
            return new Securimage_Color($color[0], $color[1], $color[2]);
        } else {
            return new Securimage_Color($default);
        }
    }
protected function initColor($color, $default)
    {
        if ($color == null) {
            return new Securimage_Color($default);
        } else if (is_string($color)) {
            try {
                return new Securimage_Color($color);
            } catch(Exception $e) {
                return new Securimage_Color($default);
            }
        } else if (is_array($color) && sizeof($color) == 3) {
            return new Securimage_Color($color[0], $color[1], $color[2]);
        } else {
            return new Securimage_Color($default);
        }
    }
protected function initColor ( $ color , $ default ) { if ( $ color == null ) { return new Securimage_Color ( $ default ) ; } else if ( is_string ( $ color ) ) { try { return new Securimage_Color ( $ color ) ; } catch ( Exception $ e ) { return new Securimage_Color ( $ default ) ; } } else if ( is_array ( $ color ) && sizeof ( $ color ) == 3 ) { return new Securimage_Color ( $ color [ 0 ] , $ color [ 1 ] , $ color [ 2 ] ) ; } else { return new Securimage_Color ( $ default ) ; } }
Convert an html color code to a Securimage_Color
@param string $color
@param Securimage_Color|string $default The defalt color to use if $color is invalid
Convert an html color code to a Securimage_Color