This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

AlgorithmicColorScheme Pennington.MonorailCss

A color scheme that generates palettes algorithmically from a seed hue and chroma. The scheme synthesises primary, base, and one or more accent palettes; see ApplyAlgorithmicColorScheme for the underlying mechanics.

Properties

AdditionalMappings Dictionary<string, ColorName>
Gets or sets additional color mappings beyond the core slots. Key is the target slot name (e.g., "info", "warning"), value is the source color.
Chroma double
Gets or sets the seed chroma for the primary palette. Typical range is 0.05 (muted) to 0.30 (vivid); the 500 stop of the generated primary lands on this value.
PrimaryHue double
required
Gets or sets the primary hue value in degrees (0-360).
Scheme CoordinatingScheme
Gets or sets the coordinating scheme that picks accent hues relative to PrimaryHue. Defaults to Complementary.

Methods

ApplyToTheme

#
public Theme ApplyToTheme(Theme theme)

Applies the color scheme to the given theme.

Parameters

theme Theme
The theme to apply colors to

Returns

Theme

Pennington.MonorailCss.AlgorithmicColorScheme

namespace Pennington.MonorailCss;

/// A color scheme that generates palettes algorithmically from a seed hue and chroma. The scheme synthesises primary, base, and one or more accent palettes; see ApplyAlgorithmicColorScheme for the underlying mechanics.
public class AlgorithmicColorScheme
{
    /// Gets or sets additional color mappings beyond the core slots. Key is the target slot name (e.g., "info", "warning"), value is the source color.
    
public Dictionary<string, ColorName> AdditionalMappings { get; set; }
/// Applies the color scheme to the given theme.
public Theme ApplyToTheme(Theme theme)
; /// Gets or sets the seed chroma for the primary palette. Typical range is 0.05 (muted) to 0.30 (vivid); the 500 stop of the generated primary lands on this value.
public double Chroma { get; set; }
/// Gets or sets the primary hue value in degrees (0-360).
public double PrimaryHue { get; set; }
/// Gets or sets the coordinating scheme that picks accent hues relative to PrimaryHue. Defaults to Complementary.
public CoordinatingScheme Scheme { get; set; }
}