Color Code Game
Create an interactive game where the user is shown a random HEX color code (e.g., #FF5733) and must guess the correct color from three colored boxes.
Requirements
-
Display a random HEX color code at the top.
-
Render 3 color boxes below it.
-
On clicking a box:
- Show
"Correct!"if the color matches. - Show
"Incorrect!"otherwise. - Display a "Play Again" button to reset the game.
- Show
Required Elements and Attributes for Testing
-
HEX Color Code Display - Must contain a text element matching
#[A-F0-9]{6}(e.g.#FF00FF) -
Color Option Boxes - Each box must have:
role="button"aria-label="Color option #XXXXXX"(e.g.Color option #FF00FF)
-
Feedback Text - Must display either:
"Correct!""Incorrect!"
-
Play Again Button - Must contain the visible text: "Play Again"
Reference UI

Companies:
Solve Similar questions 🔥
Want to upskill? Explore our courses!
Namaste DSA
Master DSA from scratch with numerous problems, and expert guidance.
Namaste React
Wanna dive deep into React and become Frontend Expert? Learn with me now!
Namaste Frontend System Design
The most comprehensive and detailed course for frontend system design.
Namaste Node.js
Wanna dive deep into Node.js? Enroll into `Namaste Node.js` now!
