Created
March 18, 2021 08:42
-
-
Save keremistan/129d426dae04bec9efd887e6972ac31b to your computer and use it in GitHub Desktop.
Getting one random color.
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 getRandomColor(): string { | |
// source: <https://stackoverflow.com/a/5365036/6656967> | |
return "#" + ((1 << 24) * Math.random() | 0).toString(16); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment