zeitlings / alfred-workflows

Collected Alfred Workflows & Proof of Concept
MIT License
164 stars 5 forks source link

CP - Hex value is incorrect. 00 shortened to 0 #17

Closed daves-flutterint closed 2 months ago

daves-flutterint commented 3 months ago

Here is my example

image
persimmonsoft commented 3 months ago

Would something like: String(format:"#%02X%02X%02X", red, green, blue) be better for formatting it? I am not a Swift dev, so I am just speculating

persimmonsoft commented 3 months ago

Created PR for fix

zeitlings commented 3 months ago

Hey @persimmonsoft Thanks, I'm traveling right now, but I'll have a look at it when I get the chance.

zeitlings commented 2 months ago

String(format:"#%02X%02X%02X", red, green, blue)

This should work fine! I'm not a big fan of this kind of string formatting, though (at least in Swift). Anyway, thanks again @daves-flutterint ! The issue should be fixed now: https://github.com/zeitlings/alfred-workflows/commit/48e4234aa246d172b8000cc753b2d3e96e83b431