The text-decoration-color property sets the color of decoration lines drawn by text-decoration-line—underlines, overlines, and line-throughs. It does not change the text (glyph) color.
The initial value is currentColor, so the line matches the text until you override it. You can also set color inside the text-decoration shorthand.
Standard-track.
Baseline widely available. Not deprecated, experimental, or non-standard.
Accessibility contrast
Keep enough contrast between the line, the text, and the background. Do not rely on decoration color alone to show focus or meaning.
Pick a text color. Here color: #1d4ed8 sets the glyphs.
Add a line. Without a line, color has nothing to paint.
Use currentColor. The line resolves to the same computed color as the text.
Reset tip.initial also returns to currentColor.
Edge Cases & Pitfalls
If the line color looks wrong, one of these is usually why.
line
No line means no visible color
text-decoration-color only paints decorations from text-decoration-line. With none, the color has no effect.
shorthand
Shorthand can wipe a custom color
Setting text-decoration: underline later resets color to currentColor. Prefer the longhand when you only want to toggle the line.
multi
One color for all lines on the element
You cannot give underline and line-through different colors on the same element. Nest spans and color each line separately.
inherit
Not inherited by default
The property’s inherited flag is no. Use the inherit keyword when a child must take the parent’s decoration color.
a11y
Color is not enough for meaning
Do not signal focus, errors, or links with decoration color alone. Pair with weight, style, or other cues, and keep contrast high.
Compatibility
Browser Support
text-decoration-color is a browser CSS property for decoration line color. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available since Jan 2020
text-decoration-color
Supported in Chrome 57+, Firefox 36+, Safari 12.1+, Edge 79+, Opera 44+, Samsung Internet 7+. Not supported in Internet Explorer.
97%Global support
Google Chrome57+
Full support
Mozilla Firefox36+
Full support
Apple Safari12.1+
Full support
Microsoft Edge79+
Full support
Opera44+
Full support
Samsung Internet7+
Full support
Internet ExplorerNo
Not supported
text-decoration-colorWidely supported
Bottom line: Safe for modern browsers. IE ignores the property and keeps the decoration at the text color.
Remember
Key Takeaways
Role: colors decoration lines without changing glyph color.
Initial value:currentColor. Not inherited.
Prerequisite: a visible text-decoration-line must exist.
Pitfall: shorthand text-decoration can reset your custom color.
One line: draw the decoration first, then set text-decoration-color when the line should differ from the text.
Frequently Asked Questions
It sets the color of decoration lines drawn by text-decoration-line, such as underlines, overlines, and line-throughs.
currentColor. The decoration matches the element’s text color unless you override it.
A decoration line must exist first. Set text-decoration-line (or the text-decoration shorthand) to underline, overline, or line-through.
Yes. Set color for the glyphs and text-decoration-color for the line. They are independent.
Not with one property. Nest elements, give each a different text-decoration-line, and set text-decoration-color on each.
Baseline widely available: Chrome 57+, Firefox 36+, Safari 12.1+, Edge 79+. Internet Explorer does not support it. It is a browser CSS property, not a Node.js feature.