public static final Color getColor ( byte [ ] data , int offset ) { Color result = null ; if ( getByte ( data , offset + 3 ) == 0 ) { int r = getByte ( data , offset ) ; int g = getByte ( data , offset + 1 ) ; int b = getByte ( data , offset + 2 ) ; result = new Color ( r , g , b ) ; } return result ; }
Reads a color value represented by three bytes for R G and B components plus a flag byte indicating if this is an automatic color . Returns null if the color type is Automatic .