private static Object parseColorContrast( List<String> params, Function<String, String> resolver )
		throws IllegalArgumentException
	{
		String colorStr = params.get( 0 );
		String darkStr = params.get( 1 );
		String lightStr = params.get( 2 );
		int threshold = (params.size() > 3) ? parsePercentage( params.get( 3 ) ) : 43;

		// parse color to compare against
		ColorUIResource color = (ColorUIResource) parseColorOrFunction( resolver.apply( colorStr ), resolver );
		if( color == null )
			return null;

		// check luma and determine whether to use dark or light color
		String darkOrLightColor = (ColorFunctions.luma( color ) * 100 < threshold)
			? lightStr
			: darkStr;

		// parse dark or light color
		return parseColorOrFunction( resolver.apply( darkOrLightColor ), resolver );
	}
Syntax: contrast(color,dark,light[,threshold])
  - color: a color to compare against
  - dark: a designated dark color (e.g. #000) or a color function
  - light: a designated light color (e.g. #fff) or a color function
  - threshold: the threshold (in range 0-100%) to specify where the transition
               from "dark" to "light" is (default is 43%)
flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java