public void setColor ( int color , boolean callback ) { int alpha = Color . alpha ( color ) ; int red = Color . red ( color ) ; int blue = Color . blue ( color ) ; int green = Color . green ( color ) ; float [ ] hsv = new float [ 3 ] ; Color . RGBToHSV ( red , green , blue , hsv ) ; this . alpha = alpha ; hue = hsv [ 0 ] ; sat = hsv [ 1 ] ; val = hsv [ 2 ] ; if ( callback && onColorChangedListener != null ) { onColorChangedListener . onColorChanged ( Color . HSVToColor ( this . alpha , new float [ ] { hue , sat , val } ) ) ; } invalidate ( ) ; }
Set the color this view should show .