const randomHexCol = () => '#' + (0x1000000 + Math.random() * 0xffffff).toString(16).slice(1, 6);
randomHexCol()
randomHexCol() // #abea67
Created
August 27, 2021 07:26
-
-
Save marcg1968/19d24bfbbf91926abc993f5e2d4c64dd to your computer and use it in GitHub Desktop.
Javascript: random colour
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment