The CSS currentcolor keyword is used to define the color but use the currently used color property. If you want to use the same color at multiple places then you can easily use currentcolor keyword. Just you have to set a color property after that you can easily use currentcolor that will set the color for all the other places where you want to set them. So in future, if you want to change all the color then you need to change color in one place.
Example 1: In this example we will use currentcolor for box-shadow.
Example 2: Text Color on Backgrounds with currentcolor.
Supported Browsers: The browsers supported by CSS currentcolor keyword are listed below:
- Google Chrome
- Internet Explorer
- CSS | revert keyword
- Difference between revert and unset keyword in CSS
- CSS | unset keyword
- Final keyword in PHP
- PHP | var keyword
- ES6 | Void Keyword
- Difference between private keyword and private fields in TypeScript
- $this keyword in PHP
- How to bind 'this' keyword to resolve classical error message 'state of undefined' in React?
- How to override the CSS properties of a class using another CSS class ?
- Difference between bootstrap.css and bootstrap-theme.css
- CSS Float
- CSS | Selectors Complete Reference
- CSS | Margins and Padding
- CSS | table-layout Property
- CSS | text-align Property
- CSS | border-top-width 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 email@example.com. 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.