Skip to content

Palette

Lukas Alexandre edited this page Sep 30, 2026 · 3 revisions

Palette

lua/railscasts/colors.lua is the runtime source of truth. The values below are the stable default palette used by Neovim, Lualine, terminal colors, and Kitty.

Default tokens

Token Hex Primary role
background #2B2B2B Main editor and terminal surface
darker_background #1F1F1F Opt-in darker editor and terminal surface
black #000000 Inverse text and strong active surfaces
beige_grey #E6E1DC Primary readable text
white #F3F4F5 Strong text and titles
grey #333435 Current-line and secondary surface
light_grey #7C6F64 Quiet separators and metadata surface
dark_grey #5F5F87 Bright terminal black and muted accent
red #DA4939 Types, constants, errors, deletions, command mode
light_green #87AF5F Strings, success, selection, additions
dark_green #005F00 Active tab/winbar surface
light_orange #FFC66D Functions and methods
dark_orange #CC7833 Keywords, preprocessing, warnings
yellow #EBE774 Search and replace mode
blue #6E9CBE Booleans and information
cyan #6D9CBE Changes, symbols, visual mode
purple #D0D0FF Labels, properties, object keys, and member fields
light_brown #92764C Comments and muted metadata
dark_brown #AF5F00 Indentation scope
moss #A5C261 Numeric literals
pink #F9D7E4 Reserved accent

Why these colors are assigned this way

The palette distinguishes code by role, not just by hue. Orange separates executable names from language control flow; green makes quoted text easy to scan; moss makes numeric values visible without competing with strings; cyan marks change and symbol state; lavender separates properties and object keys from red types and constants; and red also signals errors or destructive state. Cream remains the reading baseline so punctuation and unclassified text do not disappear between accents.

Muted brown is intentional. Comments should recede without becoming invisible; use high contrast when comments or metadata must carry more visual weight.

Darker background

darker_background = true replaces the base background token with #1F1F1F for Neovim UI surfaces and terminal color 0. It does not change any syntax, diagnostic, diff, or UI role. It is mutually exclusive with transparent mode because transparent mode intentionally leaves those surfaces unset.

High-contrast overrides

high_contrast = true changes only these tokens:

Token Default High contrast Reason
dark_green #005F00 #5FAF5F Makes active green surfaces readable
light_brown #92764C #C7A66D Raises comment and metadata contrast
light_grey #7C6F64 #635A50 Keeps quiet secondary surfaces subdued

The override does not redefine semantic roles. A comment is still muted text, for example; it is simply easier to read.

ANSI mapping

ANSI Token
0 background
1 / 9 red / dark_orange
2 / 10 light_orange / moss
3 / 11 moss / light_orange
4 / 12 cyan
5 / 13 purple
6 / 14 light_green
7 / 15 white
8 dark_grey

True-color integrations should use the named tokens directly. A 16-color terminal should use this mapping rather than inventing approximate roles.

Clone this wiki locally