Well for a long time dark theme is a pain.

Recently as I learning CSS, I find that css layers can help. I also spend a lot time inspecting Google custom search engine styles.

The @layer is available since March 2022, so it’s pretty new.

The result is as follows: github.com.

But some colors are too bright.

L*a*b color space

Then I find that there are some color system as Lab. It’s using 4 basic colors, and L channel can adjust brightness.

CIELAB

With calc I just need to reduce L channel. perfect.

videos about lab

For more idea about lab, I find some Youtube videos can help. It’s teaching how to use Lab to sharpen images. (Also I found Krita support curves too.)