Skip to content

Instantly share code, notes, and snippets.

@oguzhancvdr
Created October 22, 2022 19:40
Show Gist options
  • Save oguzhancvdr/3654436754a849a1a2b1275b008d6fe1 to your computer and use it in GitHub Desktop.
Save oguzhancvdr/3654436754a849a1a2b1275b008d6fe1 to your computer and use it in GitHub Desktop.
const getRandomHexColor = () => {
const randomValue = Math.floor(Math.random() * 0xffffff);
const hexValue = randomValue.toString(16);
return hexValue.padStart(6, "0");
};
@oguzhancvdr
Copy link
Author

Generate Random Hex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment