Skip to content

Instantly share code, notes, and snippets.

@chaoslogick
Created August 13, 2022 15:37
Show Gist options
  • Save chaoslogick/ca417dacf7765ecca2da2ec325596c72 to your computer and use it in GitHub Desktop.
Save chaoslogick/ca417dacf7765ecca2da2ec325596c72 to your computer and use it in GitHub Desktop.
JS: Random hex value
let rndHex = Math.floor(Math.random() * 0xffffff).toString(16).padEnd(6, '0');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment