public Color derive( Color baseColor ) {
		if( (hasBaseOfDefaultColor && baseOfDefaultColorRGB == baseColor.getRGB()) || baseColor == this )
			return this; // return default color

		Color result = ColorFunctions.applyFunctions( baseColor, functions );

		// if the result is equal to the default color, then the original base color
		// was passed, and we can cache this to avoid color calculations
		if( !hasBaseOfDefaultColor && result.getRGB() == this.getRGB() ) {
			hasBaseOfDefaultColor = true;
			baseOfDefaultColorRGB = baseColor.getRGB();
		}

		return result;
	}
A (red) color that acts as a placeholder in UI defaults.
The actual color is derived from another color,
which is modified by the given color functions.

@author Karl Tauber
flatlaf-core/src/main/java/com/formdev/flatlaf/util/DerivedColor.java