ColorTheme
Pennington.MonorailCss
A curated, named color theme: one seed hue grows an algorithmic brand scheme (primary / base / accent) plus a coordinating OKLCH syntax-highlight palette. Assign ColorScheme to the theme and SyntaxTheme to its SyntaxTheme.
Properties
AllIReadOnlyList<ColorTheme>- The full curated catalog, in hue-wheel order.
AquaColorTheme- Bright cyan-blue with an orange complement.
AzureColorTheme- Classic azure blue with a warm complement.
BaseColorNameColorName?- Optional neutral palette to use for
baseinstead of the hue-derived algorithmic base. Set it to a Tailwind neutral (e.g.Zinc,Stone,Slate) when you want crisp, untinted grays rather than a base subtly shifted towardPrimaryHue.null(the default) keeps the generated, hue-tinted base. Comments — which trackbase— follow this choice too. Chromadouble- Seed chroma for the brand foreground palettes. Typical range 0.05 (muted) to 0.18 (vivid); the 500 stop of the generated primary lands on this value.
CitronColorTheme- Yellow-green citrus, triadic for a punchy three-color set.
CoordinatingCoordinatingScheme- How coordinating accent hues are picked relative to
PrimaryHue. EmberColorTheme- Warm red-orange with cyan rhythm. Split-complementary.
FernColorTheme- Leafy green with neighbouring analogous accents.
GraphiteColorTheme- Restrained blue-gray for a quiet, professional brand; syntax stays legible via the chroma floor.
IndigoColorTheme- Deep indigo, triadic across the wheel.
IrisColorTheme- Violet iris, split-complementary toward yellow-green.
LagoonColorTheme- Deep teal, split-complementary toward warm coral.
MarigoldColorTheme- Golden amber with a blue complement.
Namestring- requiredDisplay name of the theme.
OrchidColorTheme- Magenta orchid with a green complement.
PrimaryHuedouble- requiredPrimary hue in degrees (0–360); the seed every palette is grown from.
RoseColorTheme- Pink-red rose with analogous warmth.
SyntaxThemeSyntaxTheme- The syntax-highlight theme paired with this color theme. Keyword/string/variable/function map onto the generated
syntax-*accent palettes (registered byApplyToTheme); comments track the neutralbasepalette.
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.ColorTheme
namespace Pennington.MonorailCss;
/// A curated, named color theme: one seed hue grows an algorithmic brand scheme (primary / base / accent) plus a coordinating OKLCH syntax-highlight palette. Assign ColorScheme to the theme and SyntaxTheme to its SyntaxTheme.
public record ColorTheme
{
/// The full curated catalog, in hue-wheel order.
public static IReadOnlyList<ColorTheme> All { get; }
/// Applies the color scheme to the given theme.
public Theme ApplyToTheme(Theme theme)
;
/// Bright cyan-blue with an orange complement.
public static ColorTheme Aqua { get; }
/// Classic azure blue with a warm complement.
public static ColorTheme Azure { get; }
/// Optional neutral palette to use for base instead of the hue-derived algorithmic base. Set it to a Tailwind neutral (e.g. Zinc, Stone, Slate) when you want crisp, untinted grays rather than a base subtly shifted toward PrimaryHue. null (the default) keeps the generated, hue-tinted base. Comments — which track base — follow this choice too.
public ColorName? BaseColorName { get; set; }
/// Seed chroma for the brand foreground palettes. Typical range 0.05 (muted) to 0.18 (vivid); the 500 stop of the generated primary lands on this value.
public double Chroma { get; set; }
/// Yellow-green citrus, triadic for a punchy three-color set.
public static ColorTheme Citron { get; }
/// How coordinating accent hues are picked relative to PrimaryHue.
public CoordinatingScheme Coordinating { get; set; }
/// Warm red-orange with cyan rhythm. Split-complementary.
public static ColorTheme Ember { get; }
/// Leafy green with neighbouring analogous accents.
public static ColorTheme Fern { get; }
/// Restrained blue-gray for a quiet, professional brand; syntax stays legible via the chroma floor.
public static ColorTheme Graphite { get; }
/// Deep indigo, triadic across the wheel.
public static ColorTheme Indigo { get; }
/// Violet iris, split-complementary toward yellow-green.
public static ColorTheme Iris { get; }
/// Deep teal, split-complementary toward warm coral.
public static ColorTheme Lagoon { get; }
/// Golden amber with a blue complement.
public static ColorTheme Marigold { get; }
/// Display name of the theme.
public string Name { get; set; }
/// Magenta orchid with a green complement.
public static ColorTheme Orchid { get; }
/// Primary hue in degrees (0–360); the seed every palette is grown from.
public double PrimaryHue { get; set; }
/// Pink-red rose with analogous warmth.
public static ColorTheme Rose { get; }
/// The syntax-highlight theme paired with this color theme. Keyword/string/variable/function map onto the generated syntax-* accent palettes (registered by ApplyToTheme); comments track the neutral base palette.
public SyntaxTheme SyntaxTheme { get; }
}