I assume you know how to represent colours in the standard notations (RGB, Hex, etc.). If not, you can read this short tutorial first.
Coloured lines are easily drawn, by adding one piece of information
per line, the strokeStyle
.
Note that all four notations (standard names, hexadecimal notation, RGB and HSL)
are supported. The order in which strokeStyle
appears does not matter - as
long as it's between beginPath()
and stroke()
.
What happens if you assign more than one colour between a
beginPath()
and a stroke()
statement?
[The following table has been adapted from Wikipedia.]
|
|
|
Keep your personal notes here. These notes are stored by your browser on your own computer, and will be available from any page on this site. You can choose to use html syntax for formatting.