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
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 override for the
baseneutral. Leave itnull(the default) to auto-pick the MonorailCss neutral whose undertone is nearestPrimaryHueviaNeutralForHue. Set it to a specific family (e.g.Zinc, orNeutralfor crisp untinted grays) to force that one instead. 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
ThemeNeutralForHue
#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
huedouble- Seed hue in degrees; normalized into 0–360 before comparison.
Returns
ColorNamePennington.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; }
}