How to Specify Colors
Last updated
Last updated
There are three ways to specify a color:
You can use a string (inside quotation marks) that names the color. Here is a that you can refer to. For example: "crimson"
You can specify the red, green, and blue components of the exact color that you want to use. Each component can vary in intensity from 0 (none) to 255 (full intensity). You need to put square brackets around the three component values and separate them with commas. For example: [220,20,60]
Any CSS color string. For example: "#D3D3D3"
rgba(220, 20, 60, .5)