STEP 14: We're almost done! We just have to let the user click between the custom color and white.

  • Inside your if block, change the integer values from 0, 255, 0 to r, g, and b.
  • Now, our pixel should go between white and your custom color every click!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)