CSS outline-color Property
Description
The outline-color property defines the color used to draw an element's outline — the visual line drawn outside the element's border to create emphasis or indicate focus. Unlike borders, outlines do not occupy space in the box model; they are rendered over the page content without affecting layout or element sizing. Because the outline's visibility also depends on the outline's style and width, the effective appearance of the outline is the result of combining outline-style, outline-width and the color you supply.
Rendering details influence how that color is perceived: outlines are typically drawn outside the border edge and may overlap shadows or neighboring content unless shifted with outline-offset. When both a border and an outline exist, the outline visually sits on top of the border; interactions with effects like box-shadow or the element's own border can change contrast and visibility, so choosing the outline color in relation to these is important for clarity.
From a practical and accessibility perspective, outline color is commonly used to render focus indicators for keyboard navigation and other UI states. Because outlines do not change layout, they are a convenient mechanism for signaling state without reflow, but you should ensure sufficient contrast and visibility for users with low vision or in different display modes. Also keep in mind that if an element's outline style is suppressed (for example by a style that renders no outline), the color will have no effect until a visible outline style and width are in place.
Definition
- Initial value
- invert
- Applies to
- All elements
- Inherited
- No
- Computed value
- The computed value for 'invert is invert'. For [color] values, the computed value is as defined for the 'color' property
- Animatable
- No
- JavaScript syntax
- object.style.outlineColor
Interactive Demo
Syntax
outline-color: <color> | invert | inherit
Values
- <color>Specify the color to use on all outlines. This can be anywhere from one to four values representing the top, right, bottom, and left outline respectively.
- invertThis is expected to perform a color inversion on the pixels on the screen.
- inherit
Example
Browser Support
The following information will show you the current browser support for the CSS outline-color property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
