question: public static Color makeBrighter ( Color color , float factor ) { int red = color . getRed ( ) ; int green = color . getGreen ( ) ; int blue = color . getBlue ( ) ; float [ ] hsb = Color . RGBtoHSB ( red , green , blue , null ) ; if ( hsb [ 2 ] == 1 ) { red += 150 ; green += 150 ; blue += 150 ; if ( blue > 255 ) { blue = 255 ; } if ( red > 255 ) { red = 255 ; } if ( green > 255 ) { green = 255 ; } hsb = Color . RGBtoHSB ( red , green , blue , null ) ; } return Color . getHSBColor ( hsb [ 0 ] , hsb [ 1 ] , factor * ( 1f + hsb [ 2 ] ) ) ; }
target:  Tries to make the given color brighter. Might not work very well with colors like 0000FF because hsb[2] is already 1.0.