Created
January 5, 2020 13:50
-
-
Save ssaurel/26f116f2707905cf2275e85bd5bf64ac to your computer and use it in GitHub Desktop.
toHex function for Hexadecimal Color Clock on the SSaurel's Blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function toHex(d) { | |
var hex = ("0" + (Number(d).toString(16))).slice(-2).toUpperCase(); | |
return hex; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment