HIDE PLAYLIST

Add color to graphics using HTML Canvas


Black is getting awfully boring, let’s add some color to our shapes.

We can use the fillStyle method on our context to add colors. In this lesson we will look at how we can pass color names, hex values, and rgba values as strings to fillStyle to add colors to our graphics.

We’ll also show why the order of where you call methods on context matters.

Please take a moment to tell your friends:

You must be a PRO Member to view code