question: public static Color decode ( String color , Color defaultColor ) { if ( color == null ) { return defaultColor ; } Color c = getNamedColor ( color ) ; if ( c == null ) { try { c = Color . decode ( color ) ; } catch ( NumberFormatException ex ) { return defaultColor ; } } return c ; }
target:  Decodes an HTML color and turns it into a Color object. Supports some named colors and String formats that are supported by Color.decode(). If no color can be decoded, returns the defaultColor specified by the caller.