Have you ever thought about building a generator by yourself?
After some research, I found some interesting article, we can build the hex color by using combination of
hex Total = 16 ** 6 = 16777216
From the total, if we translate it using toString(16), we will get the value of ‘1000000’, it’s not the hex code. We can’t use it, because it takes 7 digits of integer. So, we decrease it by 1 and using
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Random Color</title> <link rel="stylesheet" href="style.css" /> </head> <body> <div class="container"> <h1>Random Color</h1> <p>Click the hex color, to copy the color</p> <button onclick="randomColor()">Click Me</button> </div> <div class="colorize"> <div id="pallete" class="color">#3056ff</div> <div id="pallete2" class="color">#ff3033</div> <div id="pallete3" class="color">#2989d8</div> </div> <script src="app.js"></script> </body> </html>
Static code analysis is a method of debugging by examining source code before a program is run. It's done by analyzing a set of code against a set (or multiple sets) of coding rules. Static code analysis and static analysis are often used interchangeably, along with source code analysis.