question: public static String [ ] filterLightColors ( String [ ] aPalette , int aThreshold ) { List < String > filtered = new ArrayList < String > ( ) ; for ( String color : aPalette ) { if ( ! isTooLight ( color , aThreshold ) ) { filtered . add ( color ) ; } } return ( String [ ] ) filtered . toArray ( new String [ filtered . size ( ) ] ) ; }
target:  Filter out too light colors from the palette - those that do not show propely on a ligth background. The threshold controls what to filter.