You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When making terminal-friendly interfaces, it is easy to run into the
limits of 4-bit ANSI colouring. This is easily seen when trying to show
selections or highlighting, and a shaded background is required. Without
knowing if the terminal is light or dark, and what shades its ANSI
colours are, it is not possible to pick an appropriate colour.
To generate appropriate colours, some form of blending is required.
Instead of encouraging packages to just pick a colour, or do ad-hoc
blending themselves, it makes sense for us to provide a single colour
blending function that does a good job: here, by transforming the sRGB
colour into OKLab space to do the blending in, and then back to sRGB at
the end. This extra work pays off in markedly better results.
While terminal colour detection and retheming is left for later, this
work together with the base colours lays the foundation for consistently
appropriate colouring.
0 commit comments