Negating theme is based on exactly negating another (not necessarily simple) theme. One way to see how your application will look under an negated theme is to take its screenshot, paste it into any image-editing software and apply Invert / negate colors operation : all light areas become dark and vice versa (the runtime will look exactly a negate of the original theme). Note that a good-looking theme will not necessarily look good when negated.
Here are examples of
negated themes: Negated Aqua,
Negated Barby Pink, Negated Steel Blue
and Negated Sunset:
In order to globally enable negated simple themes in your application you can use the SubstanceLookAndFeel.ENABLE_NEGATED_THEMES client property and put it on UIManager with Boolean.TRUE value. In addition, you can run your application with -Dsubstancelaf.enableNegatedThemes VM flag. Once negated simple themes are enabled, the call to SubstanceLookAndFeel.getAllThemes() will return information on negated bright and cold themes as well.
In order to create an negated theme at runtime, use the following API in SubstanceTheme:
/**
* Creates a negated version of <code>this</code> theme. This method is
* part of officially supported API.
*
* @return Negated version of <code>this</code> theme.
*/
public SubstanceTheme negate()
This is the only officially supported way to create an negated theme. Note that even though the constructor for org.jvnet.substance.theme.SubstanceNegatedTheme is public, it will not create correct negated themes for non-simple (derived and complex) themes. Following are examples of negated non-simple themes:
Mixed Brown & Sun Glare and its negation:
Toned Aqua and its negation:
Complex Field of Wheat and its negation: