Wednesday, June 21, 2023

CSS accent-color

   
accent-color

The accent-color CSS property specifies the accent color for user-interface controls generated by some elements. This can be used to tint the colors of form controls, such as checkboxes, radio buttons, and progress bars.

Syntax:

The syntax for the accent-color property is as follows:

accent-color: <color>;
The value can be a hexadecimal color value, a CSS color name, or a keyword value. The keyword values that are supported are auto, primary, secondary, success, warning, and error.

Example:

The following code shows how to use the accent-color property to tint the colors of a checkbox and a radio button:

Code snippet

<input type="checkbox" accent-color="red">
<input type="radio" accent-color="blue">

In this example, the checkbox will be tinted red and the radio button will be tinted blue.

No comments:

Post a Comment