We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi
In clojurescript, rgb-hexstr and the other functions that could return a hexstr don't work:
rgb-hexstr
(color/rgb-hexstr (color/create-color "blue")) ;;=> "#%06X"
This is due to this line:
colors/src/com/evocomputing/colors.cljc
Line 401 in 30607e4
Google closure's format is limited and doesn't format hex values (see: https://stackoverflow.com/questions/24635974/clojurescript-format-string-with-goog-string-format-doesnt-substitute)
format
It would need to be done manually with something like this:
(defn hex-color [[r g b]] (str "#" (.padStart (.toString r 16) 2 "0") (.padStart (.toString g 16) 2 "0") (.padStart (.toString b 16) 2 "0")))
Let me know if you would like a PR. Thanks!
Edited to add .padStart to hex-color.
.padStart
hex-color
The text was updated successfully, but these errors were encountered:
Hi, thanks for noticing this. I'd be happy to take a PR.
Sorry, something went wrong.
No branches or pull requests
Hi
In clojurescript,
rgb-hexstr
and the other functions that could return a hexstr don't work:This is due to this line:
colors/src/com/evocomputing/colors.cljc
Line 401 in 30607e4
Google closure's
format
is limited and doesn't format hex values(see: https://stackoverflow.com/questions/24635974/clojurescript-format-string-with-goog-string-format-doesnt-substitute)
It would need to be done manually with something like this:
Let me know if you would like a PR.
Thanks!
Edited to add
.padStart
tohex-color
.The text was updated successfully, but these errors were encountered: