💾 Archived View for parsley.smol.pub › colorscheme-application captured on 2024-08-18 at 18:25:06. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-04-26)

-=-=-=-=-=-=-

Creating a terminal color scheme (part 2: application)

Last time I've designed a terminal colorscheme:

Creating a terminal color scheme (part 1: design)

Let's try to reconfigure all of my applications to use these colors.

Base16

Wouldn't it be nice to just put those 16 colors in a simple configuration file and then have templates that generate configs for any application you can think of?

Luckily, this is exactly what Base16 does:

Base16

I've chosen Neovim as the most complicated application and gave Base16 a try. The results were underwhelming. Red color was used way too much for mundane stuff like variable declarations. Colors were all over the place.

I could just shuffle colors around in the config file to my liking, right? Base16 specifies the semantics for each color. If I do swap them, I expect then my terminal colors won't match the ANSI standard.

That's so unfortunate! I really like the ideas behind Base16. Maybe the templates will be improved with time.

A dumb alternative (or is it?)

It's going to sound almost embarrassing, but this is the approach that worked. I took that simple Base16 config file with my 16 colors. Then I put nearby a similar config with Solarized colors. Then I wrote a simple script that replaces hex string of each Solarized color with matching color from my colorscheme. Done.

This approach works because my colors all match exactly 1-to-1 the tones in Solarized colorscheme. Solarized colorscheme is very popular, so there are robust themes for many applications.

This worked quite nicely!

Nice thing about this scrappy approach is that it also allows me to iterate on the colors, which happens a lot at this stage.

I keep each version of the colorscheme in a separate file. When I add a new version, I run that script to replace "v1" colors with "v2" (like I initially ran it for Solarized to "v1" replacement).

When it doesn't work well

Because Solarized is so popular, many applications have it built in; there is no config file with colors for my script to work with.

I had good success either exporting the configuration or finding the source of Solarized theme in application's source code on Github.

However there was one Neovim plugin that I ended up replacing completely, as I couldn't pull its theme apart from it.

Results

busy day on a tiny screen

(This is staged, I rarely split this tiny screen with multiple windows)

2022-01-04 | #colorscheme #design

Agent Parsley

All posts