Contact Us | +1 888 239-0733 (Toll free US/CA) Mon-Fri: 7:30am to 4:30pm (PST)

CSS 'accent-color' Property Explained

Est. Reading: 1 minute
Updated: April 2, 2024

The CSS 'accent-color' property allows you to customize the color of certain user interface elements, like checkboxes, radio buttons, range sliders, and progress bars, in a webpage. It's a way to ensure these elements match the overall design of your site without having to create custom controls.

CSS 'accent-color' Property Examples

See the Pen CSS accent-color Property by Webzstore (@webzstore) on CodePen.

Using 'accent-color' is a straightforward way to customize the look and feel of form elements and other UI components in a way that's consistent with your site's design.

Browser Support

FirefoxSafariChromeMicrosoft EdgeOpera
92.015.493.093.073.0

CSS Syntax of the 'accent-color' Property

accent-color: auto|color|initial|inherit;

Usage of the accent-color Property

Use 'accent-color' to align the color of form controls and other UI elements with your website's theme. For example, suppose your site has a primary color scheme of blue. In that case, you can use accent-color to make checkboxes and radio buttons blue instead of their default browser styling.

Property Values of the 'accent-color' Property

  • Auto: This is the default value. The browser chooses the accent color, typically based on the current color scheme or the system's preferences.
  • Color: This option allows you to specify the accent color. You can use any legal CSS color value, such as RGB, HEX, HSL, or a named color.
  • Initial: Sets the accent-color to its default value, which is auto.
  • Inherit: Inherits the accent-color from its parent element.

Ryan Parker

Ryan has been a standout in digital marketing since 2010. He's the go-to person for getting businesses noticed online, with over 300 projects under his belt—these range from helping local business owners to big online stores. As the Head of Digital Marketing at Webzstore Solutions, Ryan knows all the tricks to make companies shine on the internet. He's excellent at using the latest tech and smart strategies to get results. Ryan is all about making businesses grow and reach more people online.

chevron-down