Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › accessibility

CSS accent-color: How to Change the Color of Form Controls

By Freedom251 Team · · 4 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use CSS accent-color to tint supported native checkboxes, radio buttons, range sliders, and progress bars without replacing their browser-drawn appearance. For example: input[type="checkbox"] { accent-color: rebeccapurple; }. It does not recolor every kind of form field, and browsers may adapt the color for platform conventions or legibility.

Set an accent color on native controls

Target the control types you want to tint. This example applies one color to checkboxes, radio buttons, range sliders, and progress bars:

As an Amazon Associate I earn from qualifying purchases.

input[type="checkbox"],
input[type="radio"],
input[type="range"],
progress {
  accent-color: #5729e9;
}

The value can be any valid CSS color, such as a named color, hex value, rgb(), or hsl(). The property also accepts auto, which leaves the accent choice to the user agent and can follow the platform accent where available. Its initial value is auto, and it is inherited.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Apply it broadly or scope it carefully

A rule such as input { accent-color: #5729e9; } is concise, but it affects every eligible input below that rule. To limit the tint, target specific input types or set it on a form or theme container:

#1 Best Overall
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option
:root {
  accent-color: #5729e9;
}

.checkout-form input[type="checkbox"],
.checkout-form input[type="radio"] {
  accent-color: #5729e9;
}

Because the property is inherited, setting it on a container can pass the value to eligible descendants. A more specific declaration on a control can override the inherited value.

Which controls does accent-color affect?

MDN documents these supported control types: input[type="checkbox"], input[type="radio"], input[type="range"], and <progress>. The property is not a universal color switch for text inputs, buttons, borders, or every visual part and state of a control. See the MDN accent-color reference for the property and its current compatibility information.

For example, a checkbox tint does not mean that its label text, focus outline, or surrounding border will necessarily use the same color. Treat the accent as one part of the control’s presentation, not as a complete theme for the form.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What stays native—and what can change

accent-color is useful when you want a brand tint but want to keep the browser’s native control design. You do not have to remove the native appearance and recreate the checkbox, radio button, or slider from individual CSS parts. MDN’s advanced form styling guide describes tinting native controls while retaining platform behavior, including behavior in forced-colors modes.

Rank #3
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • Brand: Wiley
  • Set of 2 Volumes
  • A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers

The authored color is not a promise of identical pixels across every browser, operating system, control state, or accessibility setting. The CSS Working Group’s CSS Basic User Interface Module Level 4 says the user agent must maintain contrast for legibility and may adjust the color’s luminance or brightness, or substitute colors in other parts of the control. The browser’s rendering may therefore differ from the literal CSS value.

Forced-colors and high-contrast settings

Forced-colors mode can restrict colors to a user- and user-agent-defined palette and override author colors for certain properties. MDN’s system-color reference documents AccentColor for the background of accented controls and AccentColorText for their text; the actual values depend on system settings.

  • Keep the control understandable if its tint changes or is removed.
  • Do not use color alone to communicate a checked, selected, or active state.
  • Check contrast against the control’s background and nearby text.
  • Test forced-colors or high-contrast settings as well as your supported browsers.

Browser support and fallback

MDN labels accent-color “Limited availability” and says it is not Baseline because it does not work in some widely used browsers. Its compatibility data lists initial full-support versions of Chrome and Edge 93, Firefox 92, Opera 79, and Safari 15.4, with corresponding mobile entries; the same data lists no support for Internet Explorer and Samsung Internet. Compatibility data can change, so check MDN’s live table against the browsers your project supports.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When a browser does not support the property, it ignores the declaration and uses its normal control styling. That is a practical fallback if the tint is decorative. If color consistency is essential, do not assume native controls will match exactly across the whole audience; verify the actual browser matrix and ensure the form still works and communicates its states without the chosen tint.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When to use accent-color instead of custom controls

Approach Implementation effort Visual control Platform and accessibility behavior
accent-color on native controls Low: add a CSS declaration to eligible controls. Changes the accent, not the entire shape or every component detail. Retains native appearance and platform behavior; the user agent can adapt rendering for legibility and forced-colors settings.
Custom styling, often with appearance: none Higher: author the control’s appearance and states. Much greater control over shape and detailed visuals. Requires more care to reproduce interaction states, accessibility, and forced-colors behavior consistently.

Use accent-color when a tint is enough. Consider custom styling only when the native shape or detailed appearance must change, and test the resulting control’s states and accessibility behavior carefully.

Or skip the browser setup

If you need a screenshot of a page to review a form in context, ScreenshotNeo can capture it with one GET request. Replace the example URL with your page URL:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. Cookie banners, newsletter popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots, and 1,000 screenshots a month are free with no card; paid plans start at $5 for 3,000. Learn about ScreenshotNeo or sign up for the free plan.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

accessibilitybrowser compatibilityCSSForm ControlsWeb development

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.