NamedColorScheme
Pennington.MonorailCss
A color scheme that uses named Tailwind colors.
Properties
AccentColorNameColorName- requiredGets or sets the color name to map to "accent".
AdditionalMappingsDictionary<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.
BaseColorNameColorName- requiredGets or sets the color name to map to "base".
PrimaryColorNameColorName- 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 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; }
}