Commit graph

5 commits

Author SHA1 Message Date
Takuya Matsuyama 6f3bcf9cd9 refactor(util): Remove dead color and highlight helpers
The light style is a hand-written palette rather than an inversion of the
dark one, so the invert helpers lost their last caller. They only ever
called each other, and the same is true of syntax and highlight. lighten
had no callers at all.

Removing highlight orphans treesitter.lua, whose only consumer was the
ts.get call inside it, so the module goes too. day_brightness fed nothing
but invert_color and was already a no-op, so drop the option and its docs.

Also fix the vimdoc palette example, which called the now-removed
util.lighten with colors.bg_dark and colors.red1 -- tokyonight names that
have never existed in this fork.

All 2822 highlight groups across the dark, light and vivid styles are
byte-for-byte identical before and after, and the extras rebuild clean.
2026-08-11 14:49:45 +09:00
Takuya Matsuyama 308edfd998 fix(vivid): Keep colors from washing out when brightened
HSLuv preserves *relative* saturation, but the sRGB gamut narrows toward
white, so holding S constant while raising lightness silently drained real
chroma: red lost 29.8%, violet 26.6% and magenta 18.2%.

Work in LCh instead and never let chroma fall below where it started,
capped at what the gamut can hold at the new lightness. Colors already on
the boundary keep riding it up, so the hues that were not losing chroma
are untouched and near-gray tokens stay neutral.

red500     #f37574 -> #ff6c6a  (+19.7% chroma)
magenta500 #ef73a6 -> #fe67a8  (+22.1%)
violet500  #989ad7 -> #9498ea  (+35.6%)

Contrast is unchanged, with the lowest still at 6.21:1.
2026-08-11 14:03:20 +09:00
Takuya Matsuyama b08592c1bb feat(vivid): Add a high-contrast style for bright environments
Add `vivid`, a dark variant whose text colors are pushed toward white in
HSLuv space so hue and saturation stay put and only brightness moves.
Comments go from 3.45:1 to 6.21:1 against the background and syntax colors
land between 6.8:1 and 8.8:1, which keeps the theme readable outdoors
without switching every tool over to a light theme.

Background tokens are left alone since brightening those would reduce
contrast rather than add it. The boost is proportional to the remaining
headroom, so already bright colors barely move and the palette keeps its
internal ordering.

Also rename the day colorscheme to solarized-osaka-light to match the
style name it loads.
2026-08-11 11:30:58 +09:00
Miroslav Lincovschi e14e5af690 refactor: refactor theme.lua and util.lua 2024-12-18 02:49:20 +03:00
Takuya Matsuyama c33992c77a refactor(*): rename files and modules 2023-10-03 13:55:44 +09:00
Renamed from lua/tokyonight/util.lua (Browse further)