CSS stroke-color property
Browser support · legacy reference
ChromeNot supported
SafariNot supported
FirefoxNot supported
Internet ExplorerNot supported
EdgeNot supported
OperaNot supported
Description
CSS stroke-color defines the color of stroke as of border.
Remember that no browser supports stroke-color. Therefore, we use stroke, a shorthand property, to define the color of stroke.
Syntax
stroke-color : currentColor | color-name | rgb value | hexadecimal value
Property values
currentColorDefault
-
currentColor keyword represents the same color for stroke as of text color.
- Try it
stroke-color: currentColor; color-name
-
The following demo represents skyblue color for the stroke of an element.
- Try it
stroke-color: skyblue; rgb value
-
It represents rgb value of a color. The hexadecimal value of red color is given below.
- Try it
stroke-color: rgb(255,0,0); hexadecimal value
-
It represents hexadecimal notation of red color. The hexadecimal notation of blue color is given below.
- Try it
stroke-color: #0000ff;
It specifies the color of stroke only.