The text-emphasis-color property sets the color of emphasis marks on text characters — the longhand companion to text-emphasis-style.
01
Mark Color
Style emphasis dots.
02
Longhand
Color only.
03
currentColor
Match text color.
04
Hex & HSL
Any CSS color.
05
Variables
Theme tokens.
06
Pair Style
Needs a shape.
Fundamentals
Introduction
The text-emphasis-color property in CSS allows web developers to set the color of emphasis marks. Emphasis marks are used in East Asian typography to indicate emphasis, similar to how italics or boldface might be used in Western typography.
This property can be particularly useful when you need to ensure that emphasis marks stand out in a way that aligns with your website’s design.
Definition and Usage
Use text-emphasis-color when emphasis marks already exist and you want to control their color separately from the text. Set a mark shape first with text-emphasis-style or the text-emphasis shorthand, then apply your chosen color.
💡
Beginner Tip
Start with text-emphasis: circle; and then add text-emphasis-color: red; to see how the mark color changes independently from the text color.
Foundation
📝 Syntax
The syntax for the text-emphasis-color property is simple. You can specify a color using any valid CSS color value:
syntax.css
element{text-emphasis-color:color;}
Here, color can be a named color, a hexadecimal value, an RGB value, an HSL value, or any other valid CSS color value.
Basic Example
text-emphasis-color.css
p{text-emphasis:circle;text-emphasis-color:red;}
Syntax Rules
Set an emphasis style before marks become visible.
Any valid CSS color value works, including currentColor and CSS variables.
The property is inherited, so parent colors can flow to child elements.
Use the longhand when you only need to change mark color without changing shape.
Related Properties
text-emphasis — shorthand for style and color together
text-emphasis-style — sets the mark shape or custom symbol
text-emphasis-position — sets whether marks appear over or under text
Defaults
🎯 Default Value
The default value of the text-emphasis-color property is the same as the currentColor of the element, which means it inherits the color of the text unless you set a different value.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Default value
currentColor
Red circle marks
text-emphasis-color: red; with a style set
Match text color
text-emphasis-color: currentColor;
Pair with
text-emphasis-style or text-emphasis
Inherited
Yes
Animatable
Yes, as a color
Reference
💎 Property Values
The text-emphasis-color property accepts standard CSS color values.
Value
Example
Description
Named color
text-emphasis-color: red;
A color keyword such as blue, red, or green.
Hexadecimal
text-emphasis-color: #ff5733;
A hex code representing a color.
RGB
text-emphasis-color: rgb(255, 87, 51);
An RGB color value.
HSL
text-emphasis-color: hsl(9, 100%, 60%);
An HSL color value.
currentColor
text-emphasis-color: currentColor;
Uses the current value of the element’s color property.
CSS variable
text-emphasis-color: var(--accent);
Uses a reusable theme color token.
red#2563ebgreenpurple
Context
When to Use text-emphasis-color
text-emphasis-color helps you fine-tune emphasis marks without changing their shape:
Brand alignment — Match emphasis marks to your site accent or warning colors.
Contrast control — Make marks darker or brighter than body text for readability.
Multilingual layouts — Use different mark colors per language section.
Theme switching — Swap mark colors in light and dark modes with CSS variables.
Preview
👀 Live Preview
All samples use dot emphasis marks with different text-emphasis-color values:
Red emphasis mark color.
Blue emphasis mark color.
Green emphasis mark color.
Purple emphasis mark color.
currentColor matches the orange text.
Hands-On
Examples Gallery
In this example, we’ll set the text emphasis color to red, then explore more color patterns.
🎨 Basic Color Control
Set emphasis mark colors with named colors and hex values.
Example 1 — Red emphasis mark color
In this example, we’ll set the text emphasis color to red.
index.html
<style>p{text-emphasis:circle;text-emphasis-color:red;}</style><h1>Text with Custom Emphasis Color</h1><p>This text has a red emphasis mark.</p>
Lesson terms use the shared theme accent for emphasis marks.
How It Works
Updating --accent-mark on :root changes every emphasis mark that references the variable.
A11y
♿ Accessibility
Ensure enough contrast — Emphasis mark colors should remain visible against the background.
Do not rely on color alone — Marks are decorative; use semantic HTML for meaningful emphasis.
Test in light and dark themes — A mark color that works on white may fail on dark backgrounds.
Keep text readable — Very bright mark colors can distract from the content itself.
Companion
text-emphasis-color in the family
text-emphasis-color controls mark color only. Combine it with text-emphasis-style for the shape, or use the text-emphasis shorthand when you want both in one line.
Marks exist because text-emphasis-style or text-emphasis set a shape.
Style
2
You set the mark color
Apply any CSS color with text-emphasis-color, or rely on the default currentColor.
Color
3
The browser paints colored marks
Each character gets a mark in your chosen color, separate from the text foreground color.
Rendering
=
🎨
Branded emphasis marks
Marks stand out with your design colors while text color stays independent.
Compatibility
Browser Compatibility
The text-emphasis-color property is supported in most modern browsers, including the latest versions of Chrome, Firefox, Safari, and Edge. However, it is always a good practice to test your website across different browsers to ensure compatibility.
✓ Modern browsers · Wide support
Colored emphasis marks in today’s browsers
Chrome, Firefox, Safari, Edge, and Opera all support text-emphasis-color in current versions.
95%Modern browser support
Google Chrome99+ · Desktop & Mobile
Full support
Mozilla Firefox46+ · Desktop & Mobile
Full support
Apple Safari7+ · macOS & iOS
Full support
Microsoft Edge99+ · Chromium
Full support
Opera85+ · Modern versions
Full support
Testing tip
Verify mark colors in Safari and Firefox, especially when using currentColor with colored text.
text-emphasis-color property95% supported
Bottom line:text-emphasis-color is safe to use for styled emphasis marks in modern multilingual projects.
Wrap Up
Conclusion
The text-emphasis-color property is a useful tool for web developers looking to enhance the visual impact of text on their websites, particularly for East Asian typography.
By customizing the color of emphasis marks, you can ensure that your text stands out and aligns with your overall design scheme. Experiment with different colors to see how this property can enhance the readability and aesthetics of your content.
Set an emphasis style before applying text-emphasis-color
Use CSS variables for theme and dark-mode mark colors
Test mark contrast against the page background
Use currentColor when marks should follow text color
Pair with text-emphasis-position for full control
❌ Don’t
Expect marks to appear without a style set
Use very light mark colors on pale backgrounds
Rely on colored marks alone for accessibility meaning
Forget to test colored marks in multiple browsers
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about text-emphasis-color
Use these points when coloring emphasis marks.
5
Core concepts
🎨01
Mark Color
Colors the dots.
Purpose
●02
currentColor
Default value.
Default
🔴03
red
Quick example.
Named
🔁04
Inherited
Flows to children.
Cascade
♿05
Contrast
Keep marks visible.
A11y
❓ Frequently Asked Questions
text-emphasis-color sets the color of emphasis marks drawn on text characters. It works together with text-emphasis-style or the text-emphasis shorthand.
The default is currentColor, which means emphasis marks use the same color as the element text.
Yes. Emphasis marks only appear when a style is set with text-emphasis or text-emphasis-style. The color property then controls mark color.
Yes. You can use var(--token) like any other color property, which is helpful for theme colors.
Yes, text-emphasis-color is inherited, so setting it on a parent can affect emphasis marks on child elements.