pub struct ColorSchemeAndMapping {
pub color_scheme: Box<ColorScheme>,
pub color_mapping: Option<Box<ColorMapping>>,
}
Fields§
§color_scheme: Box<ColorScheme>
This element defines a set of colors which are referred to as a color scheme. The color scheme is responsible for defining a list of twelve colors. The twelve colors consist of six accent colors, two dark colors, two light colors and a color for each of a hyperlink and followed hyperlink.
The Color Scheme Color elements appear in a sequence. The following listing shows the index value and corresponding Color Name.
Sequence Index | Element (Color) Name |
---|---|
0 | dark1 |
1 | light1 |
2 | dark2 |
3 | light2 |
4 | accent1 |
5 | accent2 |
6 | accent3 |
7 | accent4 |
8 | accent5 |
9 | accent6 |
10 | hyperlink |
11 | followedHyperlink |
§Xml example
<clrScheme name="sample">
<dk1>
<sysClr val="windowText"/>
</dk1>
<lt1>
<sysClr val="window"/>
</lt1>
<dk2>
<srgbClr val="04617B"/>
</dk2>
<lt2>
<srgbClr val="DBF5F9"/>
</lt2>
<accent1>
<srgbClr val="0F6FC6"/>
</accent1>
<accent2>
<srgbClr val="009DD9"/>
</accent2>
<accent3>
<srgbClr val="0BD0D9"/>
</accent3>
<accent4>
<srgbClr val="10CF9B"/>
</accent4>
<accent5>
<srgbClr val="7CCA62"/>
</accent5>
<accent6>
<srgbClr val="A5C249"/>
</accent6>
<hlink>
<srgbClr val="FF9800"/>
</hlink>
<folHlink>
<srgbClr val="F45511"/>
</folHlink>
</clrScheme>
color_mapping: Option<Box<ColorMapping>>
This element specifics the color mapping layer which allows a user to define colors for background and text. This allows for swapping out of light/dark colors for backgrounds and the text on top of the background in order to maintain readability of the text On a deeper level, this specifies exactly which colors the first 12 values refer to in the color scheme.
§Xml example
<clrMap bg1="lt1" tx1="dk1" bg2="lt2" tx2="dk2" accent1="accent1"
accent2="accent2" accent3="accent3" accent4="accent4" accent5="accent5"
accent6="accent6" hlink="hlink" folHlink="folHlink"/>
In this example, we see that bg1 is mapped to lt1, tx1 is mapped to dk1, and so on.
Implementations§
Trait Implementations§
Source§impl Clone for ColorSchemeAndMapping
impl Clone for ColorSchemeAndMapping
Source§fn clone(&self) -> ColorSchemeAndMapping
fn clone(&self) -> ColorSchemeAndMapping
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more