CSS accent-color Property

Beginner
6 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The accent-color property sets the highlight color of a few native form controls. It colors the checked checkbox, the selected radio, and the filled part of a range or progress bar. It does not rebuild the control.

The property is inherited, so one declaration on a form themes every supported control inside it. Label text, buttons, and text fields do not change. Use color for text.

Standard-track.

Not deprecated and not experimental. It is defined in the CSS Basic User Interface Module Level 4 draft. A browser may shift your color so the control stays readable.

CSS Syntax

syntax.css
accent-color: auto | <color> | initial | inherit;

Property Values

ValueDescriptionTry it
autoDefault. The browser uses the platform accentTry it
<color>A name, hex, rgb(), hsl(), or a custom property. Colors the checked or filled partTry it
initialSets this property to its default value, autoTry it
inheritInherits this property from the parent elementTry it

How to Use accent-color

Set one color on the control, or on a parent so the children inherit it.

  1. Use a supported control: checkbox, radio, range, or progress.
  2. Set accent-color to any CSS color, or auto for the platform accent.
  3. Put the declaration on the control or on a parent. The property is inherited.
  4. Look at the checked or filled state. The label text will not change color.
PieceRequired?Role
Supported controlYesCheckbox, radio, range, or progress
<color>UsualNamed, hex, rgb(), hsl(), or a custom property
autoOptionalInitial value — browser picks the platform accent

Live Preview

Pick a color and watch the same value land on a checkbox, radio group, range, and progress bar.

Browser demo of accent-color — same idea as the examples below.

Controls
Plan
65%

accent-color: red

CSS Examples

Short snippets that set only accent-color. Use Try It Yourself for a live editor.

Example 1 — Checkbox

Color the checked state of a native checkbox with a named color.

CSS
<style>
  input {
    accent-color: red;
  }
</style>

<label>
  <input type="checkbox" checked>
  Check me out!
</label>
Try It Yourself

How It Works

  1. Target the control. input matches the checkbox.
  2. Set the accent. accent-color: red is the only declaration.
  3. Checked state paints it. The check mark uses red. An unchecked box often keeps a gray border.
  4. The label stays put. “Check me out!” uses normal text color, not the accent.

Example 2 — Inherited Radio Group

Set the color once on the form. Both radios inherit it.

CSS
<style>
  form {
    accent-color: #2563eb;
  }
</style>

<form>
  <label>
    <input type="radio" name="plan" checked>
    Basic
  </label>
  <br>
  <label>
    <input type="radio" name="plan">
    Pro
  </label>
</form>
Try It Yourself

How It Works

  1. Color the parent. The form holds #2563eb. The inputs do not repeat it.
  2. Inheritance copies the value. Each radio computes the same accent.
  3. One can be selected. name="plan" groups them. The checked dot uses the accent.
  4. Switch the selection. Click Pro. The accent moves to the newly checked radio.

Example 3 — Range and Progress

The same property colors the filled track of a slider and a progress bar.

CSS
<style>
  input,
  progress {
    accent-color: seagreen;
  }
</style>

<p>
  <label for="volume">Volume</label><br>
  <input id="volume" type="range" min="0" max="100" value="70">
</p>
<p>
  <label for="done">Done</label><br>
  <progress id="done" value="70" max="100">70%</progress>
</p>
Try It Yourself

How It Works

  1. Share one rule. Both the range input and the progress element get seagreen.
  2. Range fills to the value. value="70" means about 70% of the track uses the accent. The rest stays the default track color.
  3. Progress does the same. value="70" and max="100" fill 70% of the bar.
  4. Drag the slider. The filled length changes. The accent color stays seagreen.

Edge Cases & Pitfalls

Check these before expecting every control to change color.

scope

Only four controls paint it

Checkbox, radio, range, and progress. A button, select, or text field ignores accent-color.

text

Labels keep the text color

Use color for the words. The accent is the check, the radio dot, or the filled track.

state

Unchecked often stays gray

The accent shows on the active part. An empty checkbox border is usually still the system color.

none

appearance: none removes the accent

That keyword drops the native widget, so there is no accent left to paint. Draw the control yourself if you need a fully custom box.

contrast

The painted color may not match your hex

Browsers may adjust the accent so it stays readable. Chrome on Android, and Safari before 26.2, do not always make that adjustment.

Browser Support

accent-color is a browser style for native controls. It is not a server runtime feature, so Node.js, Deno, and Bun do not apply.

✓ Standard-track · CSS UI 4

accent-color

Chrome 93+, Edge 93+, Firefox 92+, Opera 79+, Safari 15.4+, and Samsung Internet 17+. No support in Internet Explorer.

96% Modern browser support
Google Chrome 93+ · Desktop
Full support
Mozilla Firefox 92+ · Desktop & Mobile
Full support
Apple Safari 15.4+ · Contrast fix in 26.2
Partial
Microsoft Edge 93+ · Chromium
Full support
Opera 79+ · Desktop
Full support
Samsung Internet 17+ · Android contrast may vary
Partial
Internet Explorer Not supported
Not supported
accent-color Widely supported

Bottom line: Safe in current Chrome, Edge, Firefox, Opera, and Safari. Internet Explorer ignores it and keeps the default control color. Safari before 26.2 and Chrome for Android may not enforce a minimum contrast, so check light accents on a light page.

Key Takeaways

  • Role: color the active part of checkbox, radio, range, and progress.
  • Inherited: one declaration on a form themes every supported control inside it.
  • Limits: it does not color label text, buttons, or text fields.
  • Initial value: auto keeps the platform accent.

One line: accent-color tints native checks, radios, sliders, and progress bars without replacing them.

Frequently Asked Questions

It sets the highlight color of certain native form controls. On a checkbox or radio it colors the checked mark. On a range or progress element it colors the filled part.
Browsers apply it to checkbox, radio, range, and progress. Buttons, selects, and text fields do not use it for their accent.
No. Label text uses the color property. accent-color only paints the control’s active accent, such as the check mark or the filled track.
Yes. Set it on a form or other parent and supported controls inside that parent pick it up. A rule on the control itself overrides the inherited value.
auto is the initial value. The browser uses its own platform accent instead of a color you choose.
Chrome 93+, Edge 93+, Firefox 92+, Opera 79+, Safari 15.4+, and Samsung Internet 17+. Internet Explorer does not support it. It is a browser style, not a Node.js or other server runtime feature.

Next: align-content

Learn how extra space is shared between rows or columns in a flex or grid container.

align-content tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful