private void highlightSlice ( PieModel _Slice ) { int color = _Slice . getColor ( ) ; _Slice . setHighlightedColor ( Color . argb ( 0xff , Math . min ( ( int ) ( mHighlightStrength * ( float ) Color . red ( color ) ) , 0xff ) , Math . min ( ( int ) ( mHighlightStrength * ( float ) Color . green ( color ) ) , 0xff ) , Math . min ( ( int ) ( mHighlightStrength * ( float ) Color . blue ( color ) ) , 0xff ) ) ) ; }
Calculate the highlight color . Saturate at 0xff to make sure that high values don t result in aliasing .