Query ImageMagick for a valid color names #16
Labels
documentation
Improvements or additions to documentation
enhancement
New feature or request
help wanted
Extra attention is needed
While reviewing #14 @BenLeggiero raised an interesting opportunity I can't miss discussing :)
Badgy carries a hardcoded color names for
--color
and--tint-color
properties.Alternatively, we could query ImageMagick for the list with
convert -list color | awk '{ print $1 }'
.Each solution has its pros and cons. Unfortunately, both are prone to get out of sync with the end-user scripts, as we have an unpinned dependency on ImageMagick.
All in all, it seems like a hardcoded list looks like a bit easier to reason about considering runtime and dependency validation.
Even as Badgy is destined to go out of sync with ImageMagick named colors right now, we always have an escape hatch with hexed color codes.
The text was updated successfully, but these errors were encountered: