Skip to content

Instantly share code, notes, and snippets.

@nakasyou
Created October 22, 2023 02:46
Show Gist options
  • Save nakasyou/e504f4bdcddf0bc2881e6eed55069f74 to your computer and use it in GitHub Desktop.
Save nakasyou/e504f4bdcddf0bc2881e6eed55069f74 to your computer and use it in GitHub Desktop.
get random color
// @ts-check
/**
* Get random color code
* @return {string}
*/
export const getRandomColor = () => '#' + Math.random().toString(16).slice(2, 8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment