mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-01-30 22:57:59 +00:00
b088086b06
Now, it's all under the notebook umbrella. Seems to be appropriate as it is just my notes after all. I also updated some notes from there. I didn't keep track of what it is this time. Something about more learning notes extracted from my "Learning how to learn" course notes and then some. Lack of time and hurriness just makes it difficult to track but it should be under version control already.
1.8 KiB
1.8 KiB
Generate a color scheme based from a single color
Generating human-friendly color schemes has always been a disaster (for me) to figure out especially with no cursory knowledge whatsoever on color theory. So I've been thinking how to do such thing with the result that doesn't make gouge my eyes out.
Thus, for the solution, we'll include some opinionated things.
- Generate a color with the HSLuv color space since it is .
- The color palette is composed of 16 colors inspired on Nord's documented color scheme. This easily provides a Base16 color scheme generator.
- If the given color is bright, it should create a light theme.
Here's the procedure for the color sections.
- For
base00
, invert the lightness of the color by $\pm20$ (e.g., $20$ if it's dark, $80$ if it's bright). - For
base01
tobase07
, add the lightness by $\pm5$ to $\pm10$. You can make additional tweaks for all of the parameters (e.g., hue, saturation, lightness) of the color. - On
base08
tobase0F
, you can make a uniquely randomized color palette as long as it is recognizable (ideally with at least 3 colors).
What if we want to make changes to the generation process? One way to do it is to separate the hardcoded process into a configuration. From there, we can set various procedures such as the usual Base16 scheme, terminal.sexy, or your own.