CSS column-rule-color Property

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 4 Examples
Layout & Columns

What You’ll Learn

The column-rule-color property sets the color of divider lines between columns — the longhand color piece of the column-rule shorthand.

01

Rule Color

Column divider hue.

02

Longhand

Part of column-rule.

03

currentColor

Default value.

04

Any CSS Color

Named, hex, hsl.

05

With Style

Needs width + style.

06

Design

Match your theme.

Definition and Usage

The column-rule-color CSS property specifies the color of the line drawn between columns in a multi-column layout. It enhances visual separation between columns, making content more readable and aesthetically pleasing.

Use it when you already have column-rule-width and column-rule-style set (or the column-rule shorthand) and want to control the divider color separately — for example, to match your brand palette.

💡
Beginner Tip

A column rule only appears when column-rule-style is not none and you have column-gap space. column-rule-color alone does not create a visible line.

📝 Syntax

The syntax for column-rule-color accepts any valid CSS color value:

syntax.css
selector {
  column-rule-color: color;
}

Basic Example

column-rule-color-blue.css
.columns {
  column-count: 3;
  column-gap: 20px;
  column-rule-style: solid;
  column-rule-width: 2px;
  column-rule-color: blue;
}

Syntax Rules

  • The initial value is currentcolor (matches the element’s text color).
  • Accepts named colors, hex, rgb, hsl, and CSS variables.
  • Works only when a visible column rule exists (style not none).
  • Part of the column-rule shorthand: column-rule: 2px solid blue;.
  • Pair with column-count and column-gap on multi-column containers.

⚡ Quick Reference

QuestionAnswer
Initial valuecurrentcolor
Applies toMulti-column containers with a column rule
InheritedNo
AnimatableYes, as a color
Common useBrand-colored dividers between text columns

💎 Property Values

The column-rule-color property accepts standard CSS color values.

ValueExampleMeaning
Named colorcolumn-rule-color: blue;A color keyword such as blue, red, or green.
Hexadecimalcolumn-rule-color: #ff5733;A hex code representing a color.
RGBcolumn-rule-color: rgb(255, 87, 51);An RGB color value.
HSLcolumn-rule-color: hsl(9, 100%, 60%);An HSL color value.
currentColorcolumn-rule-color: currentColor;Uses the current value of the element’s color property.
blue #ff5733 green purple

Longhand in the column-rule Family

PropertyControls
column-rule-widthThickness of the divider line
column-rule-styleLine style (solid, dashed, none, etc.)
column-rule-colorLine color (this property)
column-ruleShorthand for all three

👀 Live Preview

Each mini layout uses a 2px solid rule with a different column-rule-color — blue, red, and green.

blue
Sample text split across two columns with a blue divider line between them.
red
Sample text split across two columns with a red divider line between them.
green
Sample text split across two columns with a green divider line between them.

Examples Gallery

Try a blue rule, hex brand color, HSL value, and a CSS variable theme color.

🎨 Basic Rule Colors

Start with the reference example — a blue column rule using longhand width and style properties.

Example 1 — Blue Column Rule Color

Change the column rule color to blue on a three-column layout.

column-rule-color-blue.html
<style>
  .columns {
    column-count: 3;
    column-gap: 20px;
    column-rule-style: solid;
    column-rule-width: 2px;
    column-rule-color: blue;
  }
</style>

<div class="columns">...</div>
Try It Yourself

How It Works

With style and width set, column-rule-color: blue paints the divider lines between columns blue.

Example 2 — Hex Brand Color

Use a hex value for precise brand-colored column dividers.

column-rule-color-hex.css
.brand-columns {
  column-count: 2;
  column-gap: 2rem;
  column-rule: 1px solid;
  column-rule-color: #7c3aed;
}
Try It Yourself

How It Works

You can set width and style with the shorthand, then override only the color with the longhand property.

🛠 Functional & Theme Colors

Use HSL and CSS custom properties for flexible, theme-aware column rule colors.

Example 3 — HSL Column Rule Color

Set the rule color with HSL for easy lightness adjustments.

column-rule-color-hsl.css
.muted-rule {
  column-count: 3;
  column-gap: 1.5rem;
  column-rule: 1px dashed;
  column-rule-color: hsl(215 16% 65%);
}
Try It Yourself

How It Works

HSL makes it easy to pick a muted divider color that does not compete with body text.

Example 4 — Theme Color with CSS Variables

Store the rule color in a custom property for consistent theming.

column-rule-color-theme.css
:root {
  --rule-color: #0ea5e9;
}

.themed {
  column-count: 2;
  column-gap: 2rem;
  column-rule: 2px solid;
  column-rule-color: var(--rule-color);
}
Try It Yourself

How It Works

Change --rule-color once in :root to update every themed column rule on the page.

🧠 How column-rule-color Works

1

Column rule exists

Set column-rule-width and column-rule-style so a line can render.

Prerequisite
2

You set column-rule-color

Choose any valid CSS color with column-rule-color.

CSS rule
3

Browser paints the rule

The divider line in each column gap uses your chosen color.

Rendering
=

Themed column dividers

Column separators match your design while keeping text readable.

Modern Browser Support

The column-rule-color property is supported in most modern browsers, including Chrome, Firefox, Safari, Edge, and Opera.

Baseline · Modern browsers

Column rule colors everywhere

All major browsers support column-rule-color as part of the Multi-column Layout module.

97% Modern browser support
Google Chrome 50+ · Desktop & Mobile
Full support
Mozilla Firefox 52+ · Desktop & Mobile
Full support
Apple Safari 9+ · macOS & iOS
Full support
Microsoft Edge 12+ · All versions
Full support
Opera 37+ · Modern versions
Full support
column-rule-color property 97% supported

Bottom line: Use column-rule-color freely for multi-column divider colors. Ensure width and style are set so the rule is visible.

Conclusion

The column-rule-color property is a useful tool for enhancing the readability and design of multi-column layouts. By customizing the color of the column rule, you can create visually distinct column separations that align with your overall design scheme.

Experiment with different colors to see how this property can improve the look and feel of your web projects.

💡 Best Practices

✅ Do

  • Set column-rule-style and column-rule-width for visible rules
  • Use subtle colors that complement body text
  • Store rule colors in CSS variables for theming
  • Use longhand when changing only color on hover states
  • Pair with adequate column-gap spacing

❌ Don’t

  • Expect a visible rule with color alone — style must not be none
  • Use high-contrast neon rules that distract from content
  • Forget that default is currentcolor (text color)
  • Reset width/style when you only meant to change color — use longhand
  • Rely on column rule color for accessibility — gap and typography matter more

Key Takeaways

Knowledge Unlocked

Five things to remember about column-rule-color

Use these points when coloring column dividers.

5
Core concepts
02

currentColor

Default value.

Default
🖌 03

Longhand

Part of column-rule.

Syntax
📐 04

Needs style

Width + style too.

Tip
🛸 05

Any color

Named, hex, hsl.

Values

❓ Frequently Asked Questions

column-rule-color sets the color of the line drawn between columns in a multi-column layout. It is the longhand color component of the column-rule shorthand.
The initial value is currentcolor, which uses the element's computed text color for the column rule.
Yes. For a visible rule, set column-rule-style to something other than none and column-rule-width to a length. column-rule-color only controls the line color.
column-rule is a shorthand for width, style, and color together. column-rule-color lets you change only the color without resetting width or style.
Any valid CSS color: named colors, hex, rgb, hsl, currentColor, and CSS variables such as var(--brand-color).

Practice in the Live Editor

Open the HTML editor, set column-rule-color: blue with style and width, and preview colored column dividers.

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