-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Labels
Description
I am trying to work with ANSI block characters compatible with CP437, for example:
[ ββββ]
In some situations, I prefer the background to be rendered with spaces " ", and in others with the full block "β". That is why I find the --invert option very useful.
However, based on the output, --invert does not seem to reproduce the same image with inverted colors. Visually, the result looks different, not just color-inverted.
In theory, in strict 2-color mode, using a symbol set like:
[ β]
should produce the same image when inverted (except that foreground and background colors are swapped).
Here is a minimal example that shows the issue:
test -f Flower_yellow_and_green.png || wget https://upload.wikimedia.org/wikipedia/commons/e/e4/Flower_yellow_and_green.png
chafa -f symbols --symbols "[ β]" --fill "[ β]" --colors 2 --color-space din99d --font-ratio 0.5 -w 5 --size 60 Flower_yellow_and_green.png
chafa -f symbols --symbols "[ β]" --fill "[ β]" --invert --colors 2 --color-space din99d --font-ratio 0.5 -w 5 --size 60 Flower_yellow_and_green.png
chafa -f symbols --symbols "[ β]" --fill "[ β]" --colors 16/8 --color-space din99d --font-ratio 0.5 -w 5 --size 60 Flower_yellow_and_green.png
Reactions are currently unavailable