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

NamedColorScheme Pennington.MonorailCss

A color scheme that uses named Tailwind colors.

Properties

AccentColorName ColorName
required
Gets or sets the color name to map to "accent".
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.
BaseColorName ColorName
required
Gets or sets the color name to map to "base".
PrimaryColorName ColorName
required
Gets or sets the color name to map to "primary".

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.NamedColorScheme

namespace Pennington.MonorailCss;

/// A color scheme that uses named Tailwind colors.
public class NamedColorScheme
{
    /// Gets or sets the color name to map to "accent".
    
public ColorName AccentColorName { get; set; }
/// 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 color name to map to "base".
public ColorName BaseColorName { get; set; }
/// Gets or sets the color name to map to "primary".
public ColorName PrimaryColorName { get; set; }
}