NamedColorScheme Pennington.MonorailCss
A color scheme that uses named Tailwind colors.
Properties
AccentColorNamePennington.MonorailCss.ColorName- requiredGets or sets the color name to map to "accent".
AdditionalMappingsSystem.Collections.Generic.Dictionary<string, Pennington.MonorailCss.ColorName>- Default:
[]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. BaseColorNamePennington.MonorailCss.ColorName- requiredGets or sets the color name to map to "base".
PrimaryColorNamePennington.MonorailCss.ColorName- requiredGets 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
themeTheme- The theme to apply colors to
Returns
ThemePennington.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 required ColorName AccentColorName { get; init; }
/// 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; init; } = [];
/// Applies the color scheme to the given theme.
public Theme ApplyToTheme(Theme theme);
/// Gets or sets the color name to map to "base".
public required ColorName BaseColorName { get; init; }
/// Gets or sets the color name to map to "primary".
public required ColorName PrimaryColorName { get; init; }
}