Struct ColorSchemeAndMapping

Source
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 IndexElement (Color) Name
0dark1
1light1
2dark2
3light2
4accent1
5accent2
6accent3
7accent4
8accent5
9accent6
10hyperlink
11followedHyperlink

§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

Source§

fn clone(&self) -> ColorSchemeAndMapping

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ColorSchemeAndMapping

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.