The outline-color property sets the color of an element’s outline — the line drawn outside the border. It does not change layout. Pair it with outline-style (and usually outline-width) or use the outline shorthand.
The initial value is auto, which computes to currentColor today. Choose colors that keep strong contrast against both the page background and the element when used as a focus ring.
Baseline · Widely available.
Not deprecated. <color> values are universal. Author-set auto is not supported yet. The old invert keyword is not supported in modern browsers.
Syntax
CSS Syntax
syntax.css
outline-color:<color> | auto | initial | inherit;
Example: outline-color: #2563eb; Prefer a concrete <color> for reliable focus styles.
Click or Tab to the button to see the amber outline color.
How It Works
Replace the default. Resting outline: none is fine only if focus draws a new ring.
Turn style and width on under :focus.
Pick a clear color.outline-color: #d97706 stands out on light UIs.
Add offset.outline-offset keeps the ring from hugging the label too tightly.
Edge Cases & Pitfalls
If the color seems ignored, one of these is usually why.
style
Color alone is not enough
With outline-style: none, there is nothing to paint. Set a style (or use the outline shorthand).
a11y
Contrast against both sides of the ring
Focus outlines sit over page background and often the control itself. Aim for at least 3:1 non-text contrast (WCAG 1.4.11).
invert
invert is obsolete in practice
Modern browsers do not support outline-color: invert. Use an explicit color or currentColor.
auto
Author auto is not ready
The spec lists auto, but browsers do not treat an authored auto value yet. Rely on concrete colors for teaching and production.
shorthand
Shorthand can reset color
Writing outline: 2px solid after a custom color may restore the default color. Set outline-color again if needed.
Compatibility
Browser Support
outline-color is a browser CSS property for outline painting. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
outline-color
Color values work in all modern browsers (Chrome, Firefox, Safari, Edge, IE 8+). Prefer explicit colors over invert or auto.
99%Color value support
Google ChromeAll modern versions
Full support
Mozilla FirefoxAll modern versions
Full support
Apple SafariAll modern versions
Full support
Microsoft EdgeAll modern versions
Full support
OperaAll modern versions
Full support
Samsung InternetSupported
Full support
Internet Explorer8+
Full support
outline-colorWidely supported
Bottom line: Safe for production focus colors. Do not depend on invert or authored auto. This is not a JavaScript runtime API.
Remember
Key Takeaways
Role: set only the color of the outline ring outside the border.
Needs a style: without outline-style, the color never appears.
Default feel: initial auto acts like currentColor in practice.
Focus: pick colors with enough contrast for keyboard users.
One line:outline-color paints the ring — only after style (and width) make that ring exist.
Frequently Asked Questions
It sets only the color of an element’s outline. You still need a visible outline-style (and usually a width) or the outline will not show.
The initial value is auto, which computes to currentColor in browsers today. So the outline usually matches the element’s text color unless you set another color.
No. If outline-style is none (the default), changing only the color has no visible effect for most elements.
Yes. Any CSS <color> works: named colors, hex, rgb(), hsl(), and currentColor.
No. Set it on each element that needs a custom outline color, or use the outline shorthand.
It is Baseline Widely available. The old invert keyword is not supported in modern browsers. The auto keyword as an author value is not widely implemented yet. It is a browser CSS property, not a Node.js feature.