A colour-guessing game was built as practice for my frontend development.
This colour-guessing game:
- consists of three files, an index.html, a style.css and a script.js.
- has random colour generation
- Resets properly
- Scores points
To get started, create and open your project folder in VS Code or any code editor of your choice. Create three files as stated above.
The index.html has the basic layout for the game.
It displays a box, game status, score and a new game button.
The basic styling with code below includes large buttons, hover animations and a card layout, to make the game interface visually appealing.
The game logic is hidden in the script.js.
A random colour is generated on each page reload with six buttons also generated waiting to be clicked.
If accurate score increases, else score diminishes.
The project entails simple features and is a fun start in frontend.
To run this project simply open the index.html in a browser.



Top comments (0)