max / makeover
1 file changed,
+11 insertions,
-0 deletions
| @@ -114,6 +114,16 @@ | |||
| 114 | 114 | Color depth decides how much of a theme survives. Two tones a hair apart in | |
| 115 | 115 | 24-bit round onto one entry at 256 and onto the same gray at 16. | |
| 116 | 116 | ||
| 117 | + | The other direction is `ansi_intent(index, variant)`: which authored intent | |
| 118 | + | *paints* ANSI slot `index`, for a program that owns a terminal palette rather | |
| 119 | + | than one drawing into somebody else's. Twelve slots are chromatic and fixed | |
| 120 | + | (slot 1 is the theme's danger tone in either polarity); the four achromatic ones | |
| 121 | + | invert with it, because "black" and "white" mean the darkest and lightest tone | |
| 122 | + | the theme has, and which intent that is flips between a light theme and a dark | |
| 123 | + | one. A bare Linux console, a terminal emulator and a generated config that all | |
| 124 | + | consult this agree on what red means; they disagreed for as long as each kept | |
| 125 | + | its own table. | |
| 126 | + | ||
| 117 | 127 | ### Theme ID | |
| 118 | 128 | ||
| 119 | 129 | The theme ID is the filename without `.toml` (e.g., `catppuccin-mocha.toml` has ID `catppuccin-mocha`). IDs must contain only alphanumeric characters, hyphens, and underscores. Path traversal characters are rejected. | |
| @@ -133,6 +143,7 @@ | |||
| 133 | 143 | | `parse_theme_str(id, source, is_custom)` | Parse a theme from a string, for use with `embedded_themes()` | | |
| 134 | 144 | | `resolve(theme)` | Resolve authored intents into the full token set, deriving interactive states | | |
| 135 | 145 | | `intent_css_vars(tokens)` | Render resolved tokens as a `:root { … }` CSS block | | |
| 146 | + | | `ansi_intent(index, variant)` | Which authored intent paints ANSI slot 0-15, for a program filling a terminal palette | | |
| 136 | 147 | ||
| 137 | 148 | ## Choosing a theme | |
| 138 | 149 |