The outline-color property is utilized to define the color of the outline.
Color can be specified using:
The subsequent example displays various outlines in different colors. Additionally, observe that these elements feature a narrow black border within the outline.

Example
|
p.ex1 { |
The color of the outline can alternatively be specified using a hexadecimal value (HEX).
Example
| p.ex1 { outline-style: solid; outline-color: #ff0000; /* red */ } |
| p.ex1 { outline-style: solid; outline-color: rgb(255, 0, 0); /* red */ } |
HSL values are also an option for specifying the outline color.
Example
|
p.ex1 { |
| Explore further details about HEX, RGB, and HSL color values within our CSS Colors sections. |