private static Object parseColorFunctions( String value, Function<String, String> resolver )
		throws IllegalArgumentException
	{
		int paramsStart = value.indexOf( '(' );
		if( paramsStart < 0 )
			throw new IllegalArgumentException( "missing opening parenthesis in function '" + value + "'" );

		String function = StringUtils.substringTrimmed( value, 0, paramsStart );
		List<String> params = splitFunctionParams( value.substring( paramsStart + 1, value.length() - 1 ), ',' );
		if( params.isEmpty() )
			throw newMissingParametersException( value );

		if( parseColorDepth > 100 )
			throw new IllegalArgumentException( "endless recursion in color function '" + value + "'" );

		parseColorDepth++;
		try {
			switch( function ) {
				case "if":			return parseColorIf( value, params, resolver );
				case "lazy":		return parseColorLazy( value, params, resolver );
				case "systemColor":	return parseColorSystemColor( value, params, resolver );
				case "rgb":			return parseColorRgbOrRgba( false, params, resolver );
				case "rgba":		return parseColorRgbOrRgba( true, params, resolver );
				case "hsl":			return parseColorHslOrHsla( false, params );
				case "hsla":		return parseColorHslOrHsla( true, params );
				case "lighten":		return parseColorHSLIncreaseDecrease( 2, true, params, resolver );
				case "darken":		return parseColorHSLIncreaseDecrease( 2, false, params, resolver );
				case "saturate":	return parseColorHSLIncreaseDecrease( 1, true, params, resolver );
				case "desaturate":	return parseColorHSLIncreaseDecrease( 1, false, params, resolver );
				case "fadein":		return parseColorHSLIncreaseDecrease( 3, true, params, resolver );
				case "fadeout":		return parseColorHSLIncreaseDecrease( 3, false, params, resolver );
				case "fade":		return parseColorFade( params, resolver );
				case "spin":		return parseColorSpin( params, resolver );
				case "changeHue":		return parseColorChange( 0, params, resolver );
				case "changeSaturation":return parseColorChange( 1, params, resolver );
				case "changeLightness":	return parseColorChange( 2, params, resolver );
				case "changeAlpha":		return parseColorChange( 3, params, resolver );
				case "mix":				return parseColorMix( null, params, resolver );
				case "tint":			return parseColorMix( "#fff", params, resolver );
				case "shade":			return parseColorMix( "#000", params, resolver );
				case "contrast":		return parseColorContrast( params, resolver );
				case "over":			return parseColorOver( params, resolver );
			}
		} finally {
			parseColorDepth--;
		}

		throw new IllegalArgumentException( "unknown color function '" + value + "'" );
	}
Parses a hex color in  {@code #RGB}, {@code #RGBA}, {@code #RRGGBB} or {@code #RRGGBBAA}
format and returns it as {@code rgba} integer suitable for {@link java.awt.Color},
which includes alpha component in bits 24-31.
flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java