Feedback Requested on HTML Canvas Project

Feedback Requested on HTML Canvas Project
0

#1

Today, I wanted to learn about HTML’s <canvas> and there was no better way to learn than by writing some code to generate gradients! Link here.

My code also provides rgb values for the intermediate colours if a user clicks on that colour. Please give me feedback and let me know how I can improve my code!

Some ways that I can improve:

  1. I haven’t done error checking yet (i.e., wrong format, non-alphanumeric values excluding parantheses, etc)
  2. I can add support for hex values (and figure out how I can change my gradient generator function)

Update: I fixed some issues and added a randomizer button, left my code alone for about half an hour and was pleasantly surprised to see that it was featured on the picked page! I’m over the moon! :smiley:


#2

Interesting! You may be interested in the HTML color picker. It’d be nice to not have to type ‘rgb’ when inputing a color, too.


#3

Thanks for taking the time to look at it! I’ll work on implementing color picker. :slight_smile: