public static RgbaColor fromRgb ( String rgb ) { if ( rgb . length ( ) == 0 ) return getDefaultColor ( ) ; String [ ] parts = getRgbParts ( rgb ) . split ( "," ) ; if ( parts . length == 3 ) { return new RgbaColor ( parseInt ( parts [ 0 ] ) , parseInt ( parts [ 1 ] ) , parseInt ( parts [ 2 ] ) ) ; } else { return getDefaultColor ( ) ; } }
Parses an RgbaColor from an rgb value .