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