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.
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.
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.
| Variable | Usage |
|---|---|
bg |
Main background |
bg2 |
Secondary background (sidebars, panels) |
ui |
Borders, hover surfaces |
ui2 |
Hovered borders, cursor line background |
ui3 |
Active borders, indent guides |
tx |
Primary text, cursor, variables |
tx2 |
Muted text, parameters, matching brackets |
tx3 |
Faint text, comments, disabled elements, whitespace markers |
Each accent color has four semantic layers for different use cases:
| Layer | Usage |
|---|---|
color |
Primary accent - text, borders, icons |
color2 |
Secondary accent - alternative states |
color3 |
Background accent - search highlighting, badges |
color4 |
Subtle background - selection, diff backgrounds |
| Element | Variable | Description |
|---|---|---|
| Comments | tx3 |
Code comments and documentation |
| Keywords | magenta |
Language keywords (if, for, class, etc.) |
| Control Flow | magenta |
Control flow statements |
| Strings | green |
String literals and text |
| String Escapes | purple |
Escape sequences within strings |
| Functions | blue |
Function names and calls |
| Methods | blue |
Method names and calls |
| Constants | yellow |
Constants and compile-time values |
| Built-in Constants | orange |
Language-provided constants |
| Numbers | orange |
Numeric values and literals |
| Booleans | orange |
Boolean values (true/false) |
| Types | cyan |
Data types and type annotations |
| Classes | cyan |
Class definitions |
| Interfaces | cyan |
Interface definitions |
| Namespaces | cyan |
Namespace declarations |
| Variables | tx |
Variable names and identifiers |
| Parameters | tx2 |
Function parameters |
| Properties | tx |
Object properties and attributes |
| Built-in Functions | purple |
Built-in functions and macros |
| Macros | purple |
Macro definitions |
| Operators | tx |
Mathematical and logical operators |
| Punctuation | tx2 |
Brackets, semicolons, etc. |
| Errors | red |
Syntax errors and invalid code |
| Imports | cyan |
Import/include statements |
| Annotations | tx2 |
Decorators and annotations |
| Element | Variable | Description |
|---|---|---|
| Error text | red |
Error messages |
| Warning text | orange |
Warning messages |
| Success text | green |
Success indicators |
| Information text | blue |
Informational notes |
| Attention text | yellow |
Important notices |
| Link text | cyan |
Clickable links |
| Visited link | purple |
Previously visited |
| Hover link | blue |
Link hover state |
| Active link | green |
Link being clicked |
| Highlight text | magenta |
Highlighted content |
| Element | Variable | Description |
|---|---|---|
| Line numbers | tx3 |
Line gutter numbers |
| Current line number | tx |
Active line number |
| Cursor | tx |
Text cursor |
| Selection background | blue4 |
Selected text background |
| Current line bg | bg2 |
Current line highlight |
| Search matches | yellow3 |
Find results |
| Current search | orange3 |
Active search result |
| Visual selection | ui3 |
Visual mode selection |
| Matching brackets | tx2 |
Paired bracket highlighting |
| Indent guides | ui3 |
Indentation lines |
| Whitespace chars | tx3 |
Visible spaces/tabs |
| Fold markers | tx3 |
Code folding indicators |
| Element | Variable | Description |
|---|---|---|
| Border default | ui |
Standard borders |
| Border hover | ui2 |
Hovered borders |
| Border active | ui3 |
Active/selected |
| Border focus | blue2 |
Focused element |
| Border error | red2 |
Error state |
| Border success | green2 |
Success state |
| Hover surface | ui |
Interactive hover |
| Drop target | cyan4 |
Drag and drop zones |
| Focus ring | blue2 |
Keyboard focus |
| Disabled element | tx3 |
Disabled state |
| Element | Variable | Description |
|---|---|---|
| Primary button bg | blue |
Primary actions |
| Primary button hover | blue2 |
Primary hover |
| Secondary button bg | ui3 |
Secondary actions |
| Danger button bg | red |
Destructive actions |
| Danger button hover | red2 |
Danger hover |
| Success button bg | green |
Confirmation actions |
| Button text | bg |
Button foreground |
| Element | Variable | Description |
|---|---|---|
| Info badge bg | blue3 |
Information badges |
| Info badge fg | tx |
Information badge text |
| Success badge bg | green3 |
Success/complete badges |
| Success badge fg | tx |
Success badge text |
| Warning badge bg | yellow3 |
Warning badges |
| Warning badge fg | tx |
Warning badge text |
| Error badge bg | red3 |
Error/critical badges |
| Error badge fg | tx |
Error badge text |
| Element | Variable | Description |
|---|---|---|
| Error diagnostic | red |
Error indicators |
| Warning diagnostic | orange |
Warning indicators |
| Info diagnostic | blue |
Information markers |
| Hint diagnostic | tx2 |
Subtle suggestions |
| Breakpoints | red |
Debug breakpoints |
| Debug highlights | yellow |
Execution highlights |
| Element | Variable | Description |
|---|---|---|
| Diff header | blue |
File comparison header |
| Hunk header | orange |
@@ line markers |
| File path | purple |
a/file.txt b/file.txt |
| Metadata | tx3 |
Index, mode info |
| Added line bg | green4 |
New lines background |
| Removed line bg | red4 |
Deleted lines background |
| Modified line bg | yellow4 |
Changed lines background |
| Added word bg | green3 |
Inline additions |
| Removed word bg | red3 |
Inline deletions |
| Modified word bg | yellow3 |
Inline changes |
| Element | Variable | Description |
|---|---|---|
| Current bg | cyan4 |
HEAD changes |
| Incoming bg | blue4 |
Branch changes |
| Ancestor bg | purple4 |
Base version |
| Element | Variable | Description |
|---|---|---|
| Added | green |
New files |
| Modified | yellow |
Changed files |
| Removed | red |
Deleted files |
| Untracked | tx3 |
Untracked files |
| Ignored | tx3 |
Ignored files |
| Conflicted | red |
Merge conflicts |
| Staged | green |
Staged changes |
| ANSI | Name | Dark Theme | Light Theme | Usage |
|---|---|---|---|---|
| 0 | Black | black | black | Standard black |
| 1 | Red | red-400 | red-600 | Errors, alerts |
| 2 | Green | green-400 | green-600 | Success, additions |
| 3 | Yellow | yellow-400 | yellow-600 | Warnings |
| 4 | Blue | blue-400 | blue-600 | Information |
| 5 | Magenta | magenta-400 | magenta-600 | Special items |
| 6 | Cyan | cyan-400 | cyan-600 | Links, emphasis |
| 7 | White | base-400 | base-50 | Standard white/gray |
| 8 | Bright Black | base-500 | base-600 | Dimmed/secondary |
| 9 | Bright Red | red-300 | red-500 | Bright errors |
| 10 | Bright Green | green-300 | green-500 | Bright success |
| 11 | Bright Yellow | yellow-300 | yellow-500 | Bright warnings |
| 12 | Bright Blue | blue-300 | blue-500 | Bright info |
| 13 | Bright Magenta | magenta-300 | magenta-500 | Bright special |
| 14 | Bright Cyan | cyan-300 | cyan-500 | Bright emphasis |
| 15 | Bright White | paper | paper | Brightest white |
| Element | Dark Theme | Light Theme | Usage |
|---|---|---|---|
| Background | black | paper | Terminal background |
| Foreground | base-200 | base-800 | Terminal default text |
| Cursor | base-200 | base-800 | Terminal cursor |
| Cursor Text | black | paper | Text under cursor |
| Selection | blue-900 | blue-100 | Selected text background |
| Active Border | blue-600 | blue-400 | Active window border |
| Inactive Border | base-800 | base-200 | Inactive window border |
| Bell Border | yellow-600 | yellow-400 | Visual bell indicator |
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).
- Convention Alignment: Color assignments follow established syntax highlighting conventions for intuitive code reading
- Perceptual Balance: Colors maintain visual hierarchy without competing for attention
- Context Sensitivity: Same colors serve different purposes in UI vs. syntax contexts
- Progressive Enhancement: Basic Vim groups provide fallback, Tree-sitter adds precision, LSP adds context
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
- Foreground Priority: Variables and user content use default text color as primary focus
- Accent Hierarchy: Language constructs get distinctive colors, user content remains neutral
- Attention Balance: Bright colors (orange, yellow) reserved for values requiring attention
- Cognitive Grouping: Related concepts share colors (all functions blue, all types cyan)
- 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
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
- Foreground Colors: Use semantic variables (
tx,red,green, etc.) rather than direct palette colors - 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.
Flexoki color scheme created by Steph Ango. Licensed under the MIT License.
For the complete specification and additional ports, visit: https://stephango.com/flexoki