Created
January 24, 2026 17:32
-
-
Save Klerith/3792014c1476d2ea5aac03b8d41dc437 to your computer and use it in GitHub Desktop.
Método para generar un color hexadecimal aleatorio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| getRandomHexColor() { | |
| return ( | |
| '#' + | |
| Math.floor(Math.random() * 16777215) | |
| .toString(16) | |
| .padStart(6, '0') | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment