Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Black is so last season. If only there was a way to change the color of our shapes and lines. Wait, there is? And it's really easy? Like one line of code easy? Awesome! I';m not lying about it being easy by the way. Let's jump straight in and change the color of the square we made at the beginning of the chapter.
context.fillStyle = "rgb(255, 0, 0)"; context.fillRect(40, 40, 100, 100);