Saturated theme is based on saturating or desaturating another (not necessarily simple) theme. There are two types of saturated themes, differing in the actually saturated visual states. The first type saturates all visual states (active, default and disabled), while the second type saturates only the active visual state. The first type is more suited for the complex themes, while the second type os better suited for the simple themes (since the default and disabled themes are already slightly saturated towards blue).
Here are the examples of saturated Aqua theme. The first screenshot shows saturation on active-state only, while the second screenshot shows saturation on all states. As you can see, the all-state saturation results in possibly unwanted saturation of the watermark as well as the default and disabled controls.
Here are the examples of desaturated Aqua theme. The first screenshot shows desaturation on active-state only, while the second screenshot shows desaturation on all states:
In order to create a saturated theme at runtime, use the following API in SubstanceTheme:
/**
* Creates a saturated or desaturated version of <code>this</code> theme.
* The value and brightness stay the same. This method is part of officially
* supported API.
*
* @param saturateFactor
* Value in -1.0...1.0 range. Positive values create more
* saturated colors. Negative values create more desaturated
* colors.
* @return Saturated version of <code>this</code> theme.
*/
public SubstanceTheme saturate(double saturateFactor)
/**
* Creates a saturated or desaturated version of <code>this</code> theme.
* The value and brightness stay the same. This method is part of officially
* supported API.
*
* @param saturateFactor
* Value in -1.0...1.0 range. Positive values create more
* saturated colors. Negative values create more desaturated
* colors.
* @param toSaturateEverything
* If <code>true</code>, all visual components of
* <code>this</code> theme will be saturated. If
* <code>false</code>, only the {@link #getActiveTheme()} will
* be saturated.
* @return Saturated version of <code>this</code> theme.
*/
public SubstanceTheme saturate(double saturateFactor,
boolean toSaturateEverything)
This is the only officially supported way to create a saturated theme. Following are examples of shifted non-simple themes:
Mixed Bottle Green & Lime Green and its saturated and desaturated versions. The original:
The saturated (active-only and all):
The desaturated (active-only and all):
Complex Field of Wheat and its saturated and desaturated versions. The original:
The saturated (active-only and all):
The desaturated (active-only and all):