blampe / goat

Render ASCII art as SVG diagrams
MIT License
650 stars 40 forks source link

For blampe #8

Closed dmullis closed 2 years ago

dmullis commented 2 years ago

Generalize fix e8e6af9 for Issue https://github.com/blampe/goat/issues/7. Hard-wiring of colors other than to 'black' or 'white' eliminated, except for Github-specific code. Ordinary end users specify colors of choice on the goat command line.

One change only to SVG output: replacing a color computed by CSS 'invert()' with transparency. Coloring semantics overall are simplified, in that only one color is ever seen to be drawn on screen -- specific to either light-mode or dark-mode as reported by the @media CSS query from SVG.

dmullis commented 2 years ago

This is great, thank you! I like the idea of transparency, but it can let some of the arrow tails peek through, e.g. https://github.com/blampe/goat/blob/ef36562e480ea091428f428e6f668959accdfa52/examples/small-nodes.svg

It's certainly fixable in theory, but not something I have the time to fix in practice :)

What do you think - is it not a big deal? Or should we make the transparency optional as a bandaid?

dmullis commented 2 years ago

See fix for transparency issue in dmullis:for-blampe-1.1.