badgy icon indicating copy to clipboard operation
badgy copied to clipboard

Query ImageMagick for a valid color names

Open elfenlaid opened this issue 4 years ago • 0 comments

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.

elfenlaid avatar Jun 22 '20 09:06 elfenlaid