When a wallpaper is dominated by one color, the generated palette ends up as 16 variations of that color with little to no representation of other hues, even if they exist in the image. This matters for anything that uses hardcoded ANSI codes like ls or git diff. Currently, things like error messages and alerts, which use 'color1', end up displayed in whatever color cwal happened to put there instead of red and may blend in with the surrounding colors.
The root cause is that extraction is purely frequency-based. Colors that appear less frequently get crowded out regardless of their hue.
A tunable hue-diversity parameter would fix this at the source, something like a --hue-diversity value from 0.0 (pure frequency) to 1.0 (forced across the hue spectrum), so users can balance palette cohesion with color variety.
Related: --reload flag
It would also be useful to have a flag that re-renders all templates from the existing cached palette.
I want to post-process the generated palette before it gets written to templates. Specifically, reorder the 16 color slots by hue so that color1 ends up red-ish, color2 green-ish, and so on.
AFAIK the only hook point is the Lua backend but that requires reimplementing cwal's entire extraction just to add a sort step at the end. A --reload flag would make this easier and more controllable. The workflow would now be separated into: run cwal, modify cached colors, regenerate templates.
This wouldn't need to be a thing if a --hue-diversity is implemented
If this is already possible with the current library then please let me know ;-;
When a wallpaper is dominated by one color, the generated palette ends up as 16 variations of that color with little to no representation of other hues, even if they exist in the image. This matters for anything that uses hardcoded ANSI codes like
lsorgit diff. Currently, things like error messages and alerts, which use 'color1', end up displayed in whatever color cwal happened to put there instead of red and may blend in with the surrounding colors.The root cause is that extraction is purely frequency-based. Colors that appear less frequently get crowded out regardless of their hue.
A tunable hue-diversity parameter would fix this at the source, something like a
--hue-diversityvalue from 0.0 (pure frequency) to 1.0 (forced across the hue spectrum), so users can balance palette cohesion with color variety.Related:
--reloadflagIt would also be useful to have a flag that re-renders all templates from the existing cached palette.
I want to post-process the generated palette before it gets written to templates. Specifically, reorder the 16 color slots by hue so that color1 ends up red-ish, color2 green-ish, and so on.
AFAIK the only hook point is the Lua backend but that requires reimplementing cwal's entire extraction just to add a sort step at the end. A
--reloadflag would make this easier and more controllable. The workflow would now be separated into: run cwal, modify cached colors, regenerate templates.This wouldn't need to be a thing if a
--hue-diversityis implementedIf this is already possible with the current library then please let me know ;-;