Web design and digital-business ideas grounded in real tasks.

CSS accent-color gives native controls a brand colour with limits

A web designer testing colourful native form controls on a laptop.
AI-generated photographic illustration; not documentary photography.

A form can feel connected to a site’s visual identity without replacing every checkbox with a custom drawing. The CSS property accent-color lets the browser use a chosen colour for supported native controls. Its restraint is part of its usefulness: the browser continues to handle much of the control’s behaviour.

MDN’s accent-color reference explains the property and its compatibility limits. Support varies by browser, control and state, so it is not a promise that every form element will become the same colour.

.preferences input {
  accent-color: #6b3f8c;
}

This small rule requests a purple accent for inputs inside a preferences area. It does not remove the need for properly associated labels, clear instructions or a visible focus indicator. Nor does it make an unsuitable colour combination accessible merely because the control remains native.

Test the control as a control

Check an unchecked and checked checkbox, a selected and unselected radio option, keyboard focus and any disabled state you actually use. Test in the browsers relevant to your audience. A screenshot of one checked checkbox is too narrow to validate the form.

Also inspect the form under the user’s display preferences, including forced-colour modes where available. Do not override those preferences just to preserve a brand colour. Native rendering may intentionally change so the person can distinguish the control.

Keep the fallback acceptable. Where the property is unsupported or not applied to a particular element, the browser’s default appearance should still produce a usable form. The user should not need to recognise purple to understand which option is selected; the control’s shape, state and label should carry the meaning.

For a design review, compare the simple native version with any proposed replacement. If the custom version adds maintenance and behaviour problems without helping the task, the small accent rule may be enough. The objective is a coherent, usable form, not the elimination of every browser-provided detail.