The accent-color property lets you change the built-in highlight color of certain form controls. It is a simple way to make checkboxes, radio buttons, sliders, and progress bars match your site theme without rebuilding them from scratch.
01
Native Controls
Style browser controls safely.
02
Syntax
Use one clear CSS property.
03
Color Values
Named, hex, rgb, hsl, variables.
04
Inheritance
Set it once on a parent.
05
Accessibility
Keep contrast readable.
06
Fallbacks
Understand browser behavior.
Fundamentals
Definition and Usage
The accent-color CSS property sets the accent color used by the browser for selected or active parts of supported form controls. For example, it can turn a checked checkbox red, make a selected radio button purple, or color the filled track of a range input.
💡
Beginner Tip
Use accent-color when you want native form controls to match your brand color while keeping their built-in keyboard and screen-reader behavior.
Foundation
📝 Syntax
Write accent-color like any other CSS property. The value is usually a color:
syntax.css
selector{accent-color:color;}
Basic Example
accent-color.css
input[type="checkbox"]{accent-color:red;}
Syntax Rules
Apply accent-color to the control itself or a parent container.
The value is any valid CSS color, plus the keyword auto.
The property is inherited, so one rule can style many controls.
Unsupported browsers ignore it and keep default native control colors.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
auto
Applies to
All elements, but only supported controls visibly use it
Inherited
Yes
Animatable
By computed color value
Common use
Checkboxes, radio buttons, sliders, and progress bars
Reference
💎 Property Values
The accent-color property accepts standard CSS color values. It also accepts auto, which lets the browser choose the default system accent color.
Value
Example
Meaning
Named color
accent-color: red;
Uses a CSS color name
Hex color
accent-color: #2563eb;
Uses a hexadecimal color
RGB or HSL
accent-color: hsl(142 72% 29%);
Uses functional color notation
CSS variable
accent-color: var(--brand);
Uses a reusable theme color
auto
accent-color: auto;
Uses the browser or system default
red#2563ebgreenpurple
Scope
Supported Form Controls
accent-color works on native controls where the browser exposes a visible accent. The most common controls are:
<input type="checkbox"> — changes the checked mark or checked background color.
<input type="radio"> — changes the selected radio indicator.
<input type="range"> — changes the active part of the slider in supporting browsers.
<progress> — changes the progress fill in supporting browsers.
Preview
👀 Live Preview
These controls use the same red accent color from the reference example:
Hands-On
Examples Gallery
Try accent-color with checkboxes, radio buttons, sliders, and theme variables.
📚 Common Form Controls
Use accent-color to theme native checkboxes, radio buttons, sliders, and progress elements without rebuilding them from scratch.
Example 1 — Checkbox Accent Color
This is the simplest use case. Select a checkbox and let the browser draw it using your chosen color.
checkbox-accent.html
<style>input[type="checkbox"]{accent-color:red;}</style><label><inputtype="checkbox"checked>
Check me out!
</label>
Changing --brand-color updates every supported control that uses the variable.
A11y
♿ Accessibility
Keep enough contrast — Choose an accent color that is easy to see against the control background.
Do not rely on color alone — Labels, checked states, and text should still explain the choice.
Prefer native controls when possible — They already support keyboard navigation and screen readers.
Test focus states — Make sure the control remains visible when focused with the keyboard.
🧠 How accent-color Works
1
You set a color in CSS
Apply accent-color to a control or parent element using any standard CSS color value.
CSS rule
2
The browser maps it to native UI
Supported controls use that color for checked marks, selected radio dots, slider tracks, and progress fills.
Rendering
3
Inheritance spreads the theme
Set the property on a form or wrapper and every supported child control inherits the same accent.
Cascade
=
🎨
Branded form controls
Native controls keep keyboard and screen-reader behavior while matching your site colors.
Compatibility
Universal Browser Support
accent-color is supported in all modern browsers. Older browsers ignore the property and keep default control styling.
✓ Baseline · Modern browsers
Theme form controls in today’s browsers
Chrome, Edge, Firefox, Safari, and Opera all support accent-color for native form controls in current versions.
94%Modern browser support
Google Chrome93+ · Desktop & Mobile
Full support
Mozilla Firefox92+ · Desktop & Mobile
Full support
Apple Safari15.4+ · macOS & iOS
Full support
Microsoft Edge93+ · Chromium
Full support
Opera79+ · Modern versions
Full support
Fallback behavior
When unsupported, controls still work with the browser’s default colors.
💻
Internet ExplorerNo support · Default native colors remain
None
accent-color property94% supported
Bottom line: Use accent-color as progressive enhancement. Unsupported browsers still render usable form controls.
Wrap Up
Conclusion
The accent-color property is a small but useful CSS feature for styling native form controls. It lets you match checkboxes, radio buttons, sliders, and progress elements to your site colors without losing the benefits of browser-built controls.
For beginners, the main idea is simple: choose a readable color, apply it to supported controls, and let the browser handle the detailed control styling.
Use accent-color for simple native form control theming
Set it on a parent form when many controls share one color
Use CSS variables for brand or theme colors
Check contrast in light and dark themes
Keep labels clear and descriptive
❌ Don’t
Use very light colors that make checked states hard to see
Expect every form control to be affected
Remove native controls only for visual reasons
Depend on color as the only way to communicate state
Forget to test in the browsers your audience uses
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about accent-color
Use these points when styling your next form.
5
Core concepts
🎨01
Native Theming
Styles built-in form accents.
Purpose
☑02
Common Controls
Checkbox, radio, range, progress.
Scope
🖌03
Color Values
Use any standard CSS color.
Values
🔁04
Inherited
Can be set on a parent.
Cascade
♿05
Accessible
Keep contrast clear.
A11y
❓ Frequently Asked Questions
The accent-color property changes the theme color of certain native form controls, such as checkboxes, radio buttons, range sliders, and progress elements.
Common supported elements include input type=checkbox, input type=radio, input type=range, and progress. Browser support can vary slightly by control.
Yes. You can use named colors, hex values, rgb(), hsl(), currentColor, and CSS custom properties.
No. It is best for quick native control theming. Fully custom controls still require custom CSS, but they also require more accessibility care.
Yes, accent-color is inherited. Setting it on a form or parent container can affect supported controls inside that container.