Created
July 18, 2022 09:11
-
-
Save sangwin/cce8fd2a35638b63218bc4ee6bf7942c to your computer and use it in GitHub Desktop.
Generate a random color with JavaScript one liner function
This file contains hidden or 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
const randomColor = () => `#${Math.floor(Math.random() * 0xffffff).toString(16)}`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment