CSS text-emphasis-color Property

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 4 Examples
Typography

What You’ll Learn

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.

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.

📝 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

🎯 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.

⚡ Quick Reference

QuestionAnswer
Default valuecurrentColor
Red circle markstext-emphasis-color: red; with a style set
Match text colortext-emphasis-color: currentColor;
Pair withtext-emphasis-style or text-emphasis
InheritedYes
AnimatableYes, as a color

💎 Property Values

The text-emphasis-color property accepts standard CSS color values.

ValueExampleDescription
Named colortext-emphasis-color: red;A color keyword such as blue, red, or green.
Hexadecimaltext-emphasis-color: #ff5733;A hex code representing a color.
RGBtext-emphasis-color: rgb(255, 87, 51);An RGB color value.
HSLtext-emphasis-color: hsl(9, 100%, 60%);An HSL color value.
currentColortext-emphasis-color: currentColor;Uses the current value of the element’s color property.
CSS variabletext-emphasis-color: var(--accent);Uses a reusable theme color token.
red #2563eb green purple

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.

👀 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.

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>
Try It Yourself

How It Works

Circle marks appear in red while the paragraph text keeps its normal body color.

Example 2 — Hex brand color for marks

Use a hex value to match emphasis marks to your brand palette.

hex-emphasis-color.css
.vocab-term {
  text-emphasis-style: dot;
  text-emphasis-color: #2563eb;
}
Try It Yourself

How It Works

Splitting style and color longhands makes it easy to reuse the same mark shape with different colors.

🛠 Advanced Color Patterns

Use currentColor inheritance and CSS variables for flexible theming.

Example 3 — currentColor for matching marks

Let emphasis marks automatically follow the element text color.

currentcolor-emphasis.css
.note-warning {
  color: #ea580c;
  text-emphasis: sesame;
  text-emphasis-color: currentColor;
}
Try It Yourself

How It Works

When text color changes, emphasis marks update automatically because they share the same color value.

Example 4 — Theme color with CSS variables

Store your accent color once and reuse it for emphasis marks across the site.

variable-emphasis-color.css
:root {
  --accent-mark: #7c3aed;
}

.lesson-term {
  text-emphasis: dot;
  text-emphasis-color: var(--accent-mark);
}
Try It Yourself

How It Works

Updating --accent-mark on :root changes every emphasis mark that references the variable.

♿ 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.

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.

emphasis-longhands.css
/* Longhand */
.term {
  text-emphasis-style: dot;
  text-emphasis-color: #dc2626;
}

/* Shorthand equivalent */
.term {
  text-emphasis: dot #dc2626;
}

🧠 How text-emphasis-color Works

1

An emphasis style is active

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.

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 Chrome 99+ · Desktop & Mobile
Full support
Mozilla Firefox 46+ · Desktop & Mobile
Full support
Apple Safari 7+ · macOS & iOS
Full support
Microsoft Edge 99+ · Chromium
Full support
Opera 85+ · Modern versions
Full support

Testing tip

Verify mark colors in Safari and Firefox, especially when using currentColor with colored text.

text-emphasis-color property 95% supported

Bottom line: text-emphasis-color is safe to use for styled emphasis marks in modern multilingual projects.

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.

💡 Best Practices

✅ Do

  • 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

Key Takeaways

Knowledge Unlocked

Five things to remember about text-emphasis-color

Use these points when coloring emphasis marks.

5
Core concepts
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.

Practice in the Live Editor

Open the HTML editor and try text-emphasis-color: red; with text-emphasis: circle;.

HTML Editor →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful