CSS stroke-color property sets the color of stroke as of border.
Note: Since no browser supports stroke-color property, therefore, we use stroke as a shorthand property, to define the color of the stroke.
stroke-color: currentColor /* Or */ stroke-color: color-name /* Or */ stroke-color: rgb value /* Or */ stroke-color: hexadecimal value
Property values: This property accepts property values mentioned above and described below:
- currentColor: This property value refers to the same color for stroke as of text color.
- color-name: This property value refers to the name of the color, for example: red, green, blue, etc.
- rgb_value: This property value refers to the rgb value of the color, for example: rgb(255, 0, 0), rgb(255, 350, 1), etc.
- hexadecimal-value: This property value refers to the hexadecimal value of the color, for example: #fff, #000, etc.
Example 1: Below is the example which demonstrates the use of stroke-color property using currentColor property value
Example 2: Below is the example which demonstrates the use of stroke-color property using color-name property value
- Chrome (Not Supported)
- Safari (Not Supported)
- Firefox (Not Supported)
- Opera (Not Supported)
- Edge (Not Supported)
- Internet Explorer (Not Supported)
- CSS | transition-property Property
- How to override the CSS properties of a class using another CSS class ?
- Difference between bootstrap.css and bootstrap-theme.css
- CSS | table-layout Property
- CSS | text-align Property
- CSS | border-top-width Property
- CSS | isolation Property
- CSS | border-inline-start-style Property
- CSS | column-rule-width Property
- CSS | word-spacing Property
- CSS | animation-delay Property
- CSS | margin-top Property
- CSS | border radius property
- CSS | grid Property
- CSS | font-size-adjust Property
- CSS | visibility Property
- CSS | Display property
- CSS | grid-template-columns Property
- CSS | height Property
- CSS | transform-origin Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.