Skip to content

Commit c2be0db

Browse files
Refreshed docs for color schemes file format
1 parent 0efd183 commit c2be0db

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

docs/substance/skins/colorschemes-fileformat.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ Business Black Steel Active {
4444
}
4545
```
4646

47-
Note that you have to provide values for `kind`, as well as for each one of the seven `color` entries. Otherwise calling `SubstanceSkin.getColorSchemes` will throw an exception at runtime.
47+
Note that you have to provide values for `kind`, as well as for each one of the seven base `color` entries defined by the [BaseColorScheme](https://github.com/kirill-grouchnikov/radiance/blob/master/substance/src/main/java/org/pushingpixels/substance/api/colorscheme/BaseColorScheme.java) interface. Otherwise calling `SubstanceSkin.getColorSchemes` will throw an exception at runtime.
4848

49-
For simpler color schemes that are used with painters that only look at a single color - such as a flat background fill of a specific [decoration area](../painters/decoration.md), you can use the `colorBackground` shortcut to provide the same color for all non-foreground colors:
49+
For simpler color schemes that are used with painters that only look at a single color - such as a flat background fill of a specific [decoration area](../painters/decoration.md), you can use the `colorBackground` shortcut to provide the same color for all non-foreground base colors:
5050

5151
```plaintext
5252
Twilight Header Border {
@@ -56,7 +56,24 @@ Twilight Header Border {
5656
}
5757
```
5858

59-
Even though some complex skins might use a lot of different color schemes, a visually pleasant skin might not need more than a dozen or so different colors (with, perhaps, a slight variation between two colors for subtle gradients on certain elements). In this particular case, you might benefit from using the following syntax.
59+
Optionally, you can specify one or more colors defined by the [SchemeDerivedColors](https://github.com/kirill-grouchnikov/radiance/blob/master/substance/src/main/java/org/pushingpixels/substance/api/colorscheme/SchemeDerivedColors.java) interface:
60+
61+
```plaintext
62+
Green Magic Footer Fill {
63+
kind=Light
64+
colorBackground=#9EDDB8
65+
colorForeground=#5BA581
66+
colorSeparatorLight=#92CBAC
67+
colorSeparatorDark=#589288
68+
colorSeparatorShadow=#CAE8BD
69+
}
70+
```
71+
72+
Here, the last three lines specify the colors for painting separators (light, dark, shadow).
73+
74+
### Color references
75+
76+
Even though some complex skins might use a lot of different color schemes, a visually pleasant skin might not need more than a dozen or so different colors (with, perhaps, a slight variation between two colors for subtle gradients on certain elements). In this particular case, your color schemes can be defined in a more compact way that does not have duplicate color value definitions by using the following syntax.
6077

6178
First, start with a section that lists all your colors:
6279

0 commit comments

Comments
 (0)