Skip to content

Instantly share code, notes, and snippets.

@fariasmateuss
Created February 20, 2022 03:04
Show Gist options
  • Save fariasmateuss/9206331d24cc707d01f76448956a155d to your computer and use it in GitHub Desktop.
Save fariasmateuss/9206331d24cc707d01f76448956a155d to your computer and use it in GitHub Desktop.
Utility to generator random colors
export function randomColor() {
const hex = ((Math.random() * 0xffffff) << 0).toString(16);
return `#${hex}`;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment