Publication Style Palette
Allows you to override the palette used for rendering the publication.
This is done by mapping background colors and foreground colors to new values.
The colors must be specified as HEX color strings: #RGB (#090) #RGBA (#090a) #RRGGBB (#009900) #RRGGBBAA (#009900aa)
The following example palette displays publications in night mode. As we are "inverting" colors we map the lightest original color to darkest color:
{
backgroundLight: '#303030',
backgroundDark: '#424242',
foregroundLight: '#ffffffb3',
foregroundDark: '#ffffff',
accent: '#d48872'
}
All colors in the publication are extracted from the CSS and converted into HSL color space to determine their lightness, which is used to map background and foreground colors to values from the palette. The darkest colors found in the publication will be mapped to the Dark values of the palette and the lightest colors will be mapped to the Light colors of the palette. Values in between will be set to an interpolated color in between the Dark and Light colors of the palette.
The accent color is used for colors that have a high saturation and value in HSV color space.