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 at the same URL with .md appended. 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

ColorTheme Pennington.MonorailCss

A curated, named color theme: one seed hue grows the algorithmic primary and accent brand palettes plus a coordinating OKLCH syntax-highlight palette, while base is the stock MonorailCss neutral whose undertone sits nearest the hue (see NeutralForHue). Assign ColorScheme to the theme and SyntaxTheme to its SyntaxTheme.

Properties

All IReadOnlyList<ColorTheme>
The full curated catalog, in hue-wheel order.
Aqua ColorTheme
Bright cyan-blue with an orange complement.
Azure ColorTheme
Classic azure blue with a warm complement.
BaseColorName ColorName?
Optional override for the base neutral. Leave it null (the default) to auto-pick the MonorailCss neutral whose undertone is nearest PrimaryHue via NeutralForHue. Set it to a specific family (e.g. Zinc, or Neutral for crisp untinted grays) to force that one instead. Comments — which track base — follow this choice too.
Chroma double
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.
Citron ColorTheme
Yellow-green citrus, triadic for a punchy three-color set.
Coordinating CoordinatingScheme
How coordinating accent hues are picked relative to PrimaryHue.
Ember ColorTheme
Warm red-orange with cyan rhythm. Split-complementary.
Fern ColorTheme
Leafy green with neighbouring analogous accents.
Graphite ColorTheme
Restrained blue-gray for a quiet, professional brand; syntax stays legible via the chroma floor.
Indigo ColorTheme
Deep indigo, triadic across the wheel.
Iris ColorTheme
Violet iris, split-complementary toward yellow-green.
Lagoon ColorTheme
Deep teal, split-complementary toward warm coral.
Marigold ColorTheme
Golden amber with a blue complement.
Name string
required
Display name of the theme.
Orchid ColorTheme
Magenta orchid with a green complement.
PrimaryHue double
required
Primary hue in degrees (0–360); the seed every palette is grown from.
Rose ColorTheme
Pink-red rose with analogous warmth.
SyntaxTheme SyntaxTheme
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.

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

NeutralForHue

#
public static ColorName NeutralForHue(double hue)

Picks the MonorailCss neutral palette whose undertone hue sits nearest hue (measured around the color wheel), giving base grays that coordinate with the brand. The pure, hueless Neutral is never auto-selected — request it explicitly via BaseColorName when you want untinted grays.

Parameters

hue double
Seed hue in degrees; normalized into 0–360 before comparison.

Returns

ColorName

Pennington.MonorailCss.ColorTheme

namespace Pennington.MonorailCss;

/// A curated, named color theme: one seed hue grows the algorithmic primary and accent brand palettes plus a coordinating OKLCH syntax-highlight palette, while base is the stock MonorailCss neutral whose undertone sits nearest the hue (see NeutralForHue). 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 override for the base neutral. Leave it null (the default) to auto-pick the MonorailCss neutral whose undertone is nearest PrimaryHue via NeutralForHue. Set it to a specific family (e.g. Zinc, or Neutral for crisp untinted grays) to force that one instead. 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; }
/// Picks the MonorailCss neutral palette whose undertone hue sits nearest hue (measured around the color wheel), giving base grays that coordinate with the brand. The pure, hueless Neutral is never auto-selected — request it explicitly via BaseColorName when you want untinted grays.
public static ColorName NeutralForHue(double hue)
; /// 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; }
}