Flexoki Color Palette

September 2, 2025 ยท View on GitHub

An inky color scheme for prose and code, designed for reading and writing on digital screens. Inspired by analog inks and warm shades of paper.

Note

This documentation is based on the Flexoki color scheme by Steph Ango. This implementation includes research-based deviations from the original Flexoki specification to align with a majority of the current popular color schemes. For the complete original specification and additional resources, visit stephango.com/flexoki.

Color Palette

The complete Flexoki color palette includes base colors and accent colors with exponentially increasing intensity as colors get lighter or darker, emulating pigment on paper.

This section maps each color to semantic variables These semantic variables (like bg, tx, red) abstract the actual color values, allowing automatic theme switching between light and dark modes. The tables below show which variables are assigned to each palette color in both light and dark themes.

Base Colors

ColorNameHexDark ThemeLight Theme
black#100F0Fbg-
base-950#1C1B1Abg2-
base-900#282726ui-
base-850#343331ui2-
base-800#403E3Cui3tx
base-700#575653tx3-
base-600#6F6E69--
base-500#878580tx2tx2
base-400#9F9D96--
base-300#B7B5AC-tx3
base-200#CECDC3txui3
base-150#DAD8CE-ui2
base-100#E6E4D9-ui
base-50#F2F0E5-bg2
paper#FFFCF0-bg

Red

ColorNameHexDark ThemeLight Theme
red-950#261312--
red-900#3E1715red4-
red-850#551B18--
red-800#6C201Cred3-
red-700#942822--
red-600#AF3029red2red
red-500#C03E35--
red-400#D14D41redred2
red-300#E8705F--
red-200#F89A8A-red3
red-150#FDB2A2--
red-100#FFCABB-red4
red-50#FFE1D5--

Orange

ColorNameHexDark ThemeLight Theme
orange-950#27180E--
orange-900#40200Dorange4-
orange-850#59290D--
orange-800#71320Dorange3-
orange-700#9D4310--
orange-600#BC5215orange2orange
orange-500#CB6120--
orange-400#DA702Corangeorange2
orange-300#EC8B49--
orange-200#F9AE77-orange3
orange-150#FCC192--
orange-100#FED3AF-orange4
orange-50#FFE7CE--

Yellow

ColorNameHexDark ThemeLight Theme
yellow-950#241E08--
yellow-900#3A2D04yellow4-
yellow-850#503D02--
yellow-800#664D01yellow3-
yellow-700#8E6B01--
yellow-600#AD8301yellow2yellow
yellow-500#BE9207--
yellow-400#D0A215yellowyellow2
yellow-300#DFB431--
yellow-200#ECCB60-yellow3
yellow-150#F1D67E--
yellow-100#F6E2A0-yellow4
yellow-50#FAEEC6--

Green

ColorNameHexDark ThemeLight Theme
green-950#1A1E0C--
green-900#252D09green4-
green-850#313D07--
green-800#3D4C07green3-
green-700#536907--
green-600#66800Bgreen2green
green-500#768D21--
green-400#879A39greengreen2
green-300#A0AF54--
green-200#BEC97E-green3
green-150#CDD597--
green-100#DDE2B2-green4
green-50#EDEECF--

Cyan

ColorNameHexDark ThemeLight Theme
cyan-950#101F1D--
cyan-900#122F2Ccyan4-
cyan-850#143F3C--
cyan-800#164F4Acyan3-
cyan-700#1C6C66--
cyan-600#24837Bcyan2cyan
cyan-500#2F968D--
cyan-400#3AA99Fcyancyan2
cyan-300#5ABDAC--
cyan-200#87D3C3-cyan3
cyan-150#A2DECE--
cyan-100#BFE8D9-cyan4
cyan-50#DDF1E4--

Blue

ColorNameHexDark ThemeLight Theme
blue-950#101A24--
blue-900#12253Bblue4-
blue-850#133051--
blue-800#163B66blue3-
blue-700#1A4F8C--
blue-600#205EA6blue2blue
blue-500#3171B2--
blue-400#4385BEblueblue2
blue-300#66A0C8--
blue-200#92BFDB-blue3
blue-150#ABCFE2--
blue-100#C6DDE8-blue4
blue-50#E1ECEB--

Purple

ColorNameHexDark ThemeLight Theme
purple-950#1A1623--
purple-900#261C39purple4-
purple-850#31234E--
purple-800#3C2A62purple3-
purple-700#4F3685--
purple-600#5E409Dpurple2purple
purple-500#735EB5--
purple-400#8B7EC8purplepurple2
purple-300#A699D0--
purple-200#C4B9E0-purple3
purple-150#D3CAE6--
purple-100#E2D9E9-purple4
purple-50#F0EAEC--

Magenta

ColorNameHexDark ThemeLight Theme
magenta-950#24131D--
magenta-900#39172Bmagenta4-
magenta-850#4F1B39--
magenta-800#641F46magenta3-
magenta-700#87285E--
magenta-600#A02F6Fmagenta2magenta
magenta-500#B74583--
magenta-400#CE5D97magentamagenta2
magenta-300#E47DA8--
magenta-200#F4A4C2-magenta3
magenta-150#F9B9CF--
magenta-100#FCCFDA-magenta4
magenta-50#FEE4E5--

Semantic Variable Usage Tables

This section maps semantic variables to specific UI elements and syntax highlighting categories. Use these tables as a reference when implementing Flexoki to ensure consistent color usage across different contexts. Each table shows which semantic variable should be used for each UI element or syntax construct.

Base Color Variables

VariableUsage
bgMain background
bg2Secondary background (sidebars, panels)
uiBorders, hover surfaces
ui2Hovered borders, cursor line background
ui3Active borders, indent guides
txPrimary text, cursor, variables
tx2Muted text, parameters, matching brackets
tx3Faint text, comments, disabled elements, whitespace markers

Accent Color Variables

Each accent color has four semantic layers for different use cases:

LayerUsage
colorPrimary accent - text, borders, icons
color2Secondary accent - alternative states
color3Background accent - search highlighting, badges
color4Subtle background - selection, diff backgrounds

Syntax Highlighting Assignments

ElementVariableDescription
Commentstx3Code comments and documentation
KeywordsmagentaLanguage keywords (if, for, class, etc.)
Control FlowmagentaControl flow statements
StringsgreenString literals and text
String EscapespurpleEscape sequences within strings
FunctionsblueFunction names and calls
MethodsblueMethod names and calls
ConstantsyellowConstants and compile-time values
Built-in ConstantsorangeLanguage-provided constants
NumbersorangeNumeric values and literals
BooleansorangeBoolean values (true/false)
TypescyanData types and type annotations
ClassescyanClass definitions
InterfacescyanInterface definitions
NamespacescyanNamespace declarations
VariablestxVariable names and identifiers
Parameterstx2Function parameters
PropertiestxObject properties and attributes
Built-in FunctionspurpleBuilt-in functions and macros
MacrospurpleMacro definitions
OperatorstxMathematical and logical operators
Punctuationtx2Brackets, semicolons, etc.
ErrorsredSyntax errors and invalid code
ImportscyanImport/include statements
Annotationstx2Decorators and annotations

UI Element Assignments

Text States

ElementVariableDescription
Error textredError messages
Warning textorangeWarning messages
Success textgreenSuccess indicators
Information textblueInformational notes
Attention textyellowImportant notices
Link textcyanClickable links
Visited linkpurplePreviously visited
Hover linkblueLink hover state
Active linkgreenLink being clicked
Highlight textmagentaHighlighted content

Editor Interface

ElementVariableDescription
Line numberstx3Line gutter numbers
Current line numbertxActive line number
CursortxText cursor
Selection backgroundblue4Selected text background
Current line bgbg2Current line highlight
Search matchesyellow3Find results
Current searchorange3Active search result
Visual selectionui3Visual mode selection
Matching bracketstx2Paired bracket highlighting
Indent guidesui3Indentation lines
Whitespace charstx3Visible spaces/tabs
Fold markerstx3Code folding indicators

UI Components

ElementVariableDescription
Border defaultuiStandard borders
Border hoverui2Hovered borders
Border activeui3Active/selected
Border focusblue2Focused element
Border errorred2Error state
Border successgreen2Success state
Hover surfaceuiInteractive hover
Drop targetcyan4Drag and drop zones
Focus ringblue2Keyboard focus
Disabled elementtx3Disabled state

Buttons

ElementVariableDescription
Primary button bgbluePrimary actions
Primary button hoverblue2Primary hover
Secondary button bgui3Secondary actions
Danger button bgredDestructive actions
Danger button hoverred2Danger hover
Success button bggreenConfirmation actions
Button textbgButton foreground

Status Badges

ElementVariableDescription
Info badge bgblue3Information badges
Info badge fgtxInformation badge text
Success badge bggreen3Success/complete badges
Success badge fgtxSuccess badge text
Warning badge bgyellow3Warning badges
Warning badge fgtxWarning badge text
Error badge bgred3Error/critical badges
Error badge fgtxError badge text

Diagnostics

ElementVariableDescription
Error diagnosticredError indicators
Warning diagnosticorangeWarning indicators
Info diagnosticblueInformation markers
Hint diagnostictx2Subtle suggestions
BreakpointsredDebug breakpoints
Debug highlightsyellowExecution highlights

Git & Version Control

Diff View

ElementVariableDescription
Diff headerblueFile comparison header
Hunk headerorange@@ line markers
File pathpurplea/file.txt b/file.txt
Metadatatx3Index, mode info
Added line bggreen4New lines background
Removed line bgred4Deleted lines background
Modified line bgyellow4Changed lines background
Added word bggreen3Inline additions
Removed word bgred3Inline deletions
Modified word bgyellow3Inline changes

Merge Conflicts

ElementVariableDescription
Current bgcyan4HEAD changes
Incoming bgblue4Branch changes
Ancestor bgpurple4Base version

Git Status

ElementVariableDescription
AddedgreenNew files
ModifiedyellowChanged files
RemovedredDeleted files
Untrackedtx3Untracked files
Ignoredtx3Ignored files
ConflictedredMerge conflicts
StagedgreenStaged changes

Terminal & ANSI Colors

Standard 16-Color Palette

ANSINameDark ThemeLight ThemeUsage
0BlackblackblackStandard black
1Redred-400red-600Errors, alerts
2Greengreen-400green-600Success, additions
3Yellowyellow-400yellow-600Warnings
4Blueblue-400blue-600Information
5Magentamagenta-400magenta-600Special items
6Cyancyan-400cyan-600Links, emphasis
7Whitebase-400base-50Standard white/gray
8Bright Blackbase-500base-600Dimmed/secondary
9Bright Redred-300red-500Bright errors
10Bright Greengreen-300green-500Bright success
11Bright Yellowyellow-300yellow-500Bright warnings
12Bright Blueblue-300blue-500Bright info
13Bright Magentamagenta-300magenta-500Bright special
14Bright Cyancyan-300cyan-500Bright emphasis
15Bright WhitepaperpaperBrightest white

Terminal Window Colors

ElementDark ThemeLight ThemeUsage
BackgroundblackpaperTerminal background
Foregroundbase-200base-800Terminal default text
Cursorbase-200base-800Terminal cursor
Cursor TextblackpaperText under cursor
Selectionblue-900blue-100Selected text background
Active Borderblue-600blue-400Active window border
Inactive Borderbase-800base-200Inactive window border
Bell Borderyellow-600yellow-400Visual bell indicator

Guidelines and Explanations

Theme System

Flexoki uses semantic color variables that automatically map to appropriate values based on theme selection:

  • Light themes: Use 600-level accent colors for primary usage
  • Dark themes: Use 400-level accent colors for primary usage
  • Base colors: Automatically mapped based on theme selection

The theme system is designed with four semantic layers for each accent color (defined in the usage tables above).

Design Principles

  1. Convention Alignment: Color assignments follow established syntax highlighting conventions for intuitive code reading
  2. Perceptual Balance: Colors maintain visual hierarchy without competing for attention
  3. Context Sensitivity: Same colors serve different purposes in UI vs. syntax contexts
  4. Progressive Enhancement: Basic Vim groups provide fallback, Tree-sitter adds precision, LSP adds context

Color Rationale

Industry-Standard Assignments

The color choices align with conventions used in 90%+ of modern themes:

  • Magenta: Keywords & control flow - universally signals "special language constructs"
  • Green: String literals - represents literal text content within code
  • Blue: Functions & methods - indicates callable/executable code blocks
  • Orange: Numbers & literals - draws attention to values without alarm
  • Cyan: Types & architecture - indicates type definitions and structural elements
  • Yellow: Constants - indicates immutable values and compile-time constants
  • Purple: Language features & macros - meta-programming elements
  • Red: Errors - universal error indicator

Visual Hierarchy Principles

  1. Foreground Priority: Variables and user content use default text color as primary focus
  2. Accent Hierarchy: Language constructs get distinctive colors, user content remains neutral
  3. Attention Balance: Bright colors (orange, yellow) reserved for values requiring attention
  4. Cognitive Grouping: Related concepts share colors (all functions blue, all types cyan)

Accessibility Considerations

  • Contrast Ratios: All color combinations maintain WCAG AA compliance (4.5:1 minimum)
  • Color Blindness: Designed with multiple visual cues beyond color alone
  • Perceptual Balance: Colors chosen using Oklab color space for consistent perceived intensity
  • Text Hierarchy: The tx1-4 progression uses Oklab perceptual modeling to ensure consistent contrast steps across light and dark themes

Implementation Approach

Layer 1: Basic Syntax Groups (Maximum Compatibility)

  • Implement fundamental syntax categories first (comments, keywords, strings, etc.)
  • Ensures compatibility with basic highlighting systems
  • Provides fallback for simple or legacy highlighting engines

Layer 2: Semantic Enhancement (Precision)

  • Add precise semantic category mappings for improved accuracy
  • Focus on language-agnostic semantic consistency
  • Use more granular color distinctions for syntax elements

Layer 3: Contextual Highlighting (Intelligence)

  • Layer context-aware highlighting over semantic categories
  • Provide advanced colors based on usage context (definitions vs references)
  • Enable sophisticated features like scope-based dimming

Color Usage Best Practices

  1. Foreground Colors: Use semantic variables (tx, red, green, etc.) rather than direct palette colors
  2. Background Usage: Apply base colors (bg, bg2, ui, etc.) with appropriate opacity for overlays

Important

Text colors are guidelines. Legibility always comes first. Adjust colors when they don't provide sufficient contrast in your specific environment.

Attribution

Flexoki color scheme created by Steph Ango. Licensed under the MIT License.

For the complete specification and additional ports, visit: https://stephango.com/flexoki