Skip to content
engineering workbench.by StudyPort Academy
All projects
Intermediate25 min

Color scheme switcher

Let each original color box change the page through one shared listener.

EventsStyles

YOUR BUILD CHECKLIST

  1. Inspect the boxes NodeList.
  2. Activate each color using a mouse and keyboard.
  3. Trace e.target.id to the background assignment.
Editable original
Opening editor…
LIVE PREVIEW
Console 0

Your console output appears here.

Saved on this deviceJavaScript · ES2022
Notes on this source port
  • Use native buttons for the original color boxes to make the exact click logic keyboard-operable.

Make it your own

The original works. These are your next experiments.

  • Remember the selected color.
  • Choose foreground colors with readable contrast.
Open a fresh playground