---
id: css-color-keywords
title: "CSS Color Keywords"
category: "Frontend"
status: "draft"
verification_status: "conceptual"
canonical_id: ""
aliases: ["transparent keyword", "currentcolor", "inherit color", "CSS special colors", "color keyword", "predefined color keywords"]
duplicate_of: ""
source_trust_level: "B"
confidence_score: 0.88
created_at: 2026-06-23
updated_at: 2026-06-23
review_reason: ""
merge_history: []
tags: ["css", "web", "frontend", "w3schools", "colors", "keywords"]
raw_sources: ["https://www.w3schools.com/css/css_colors_keywords.asp"]
applied_in: []
github_commit: ""
---

# [[CSS Color Keywords]]

## 🎯 한 줄 통찰 (One-line insight)
CSS provides special predefined color keywords — `transparent`, `currentcolor`, and `inherit` — that go beyond fixed color values to make backgrounds see-through, reuse the current text color, or pull a color from the parent element. [S1]

## 🧠 핵심 개념 (Core concepts)
- **Special keywords** — CSS has special predefined color keywords usable with properties like `color`, `background-color`, and `border-color`. The page covers `transparent`, `currentcolor`, and `inherit`. [S1]
- **`transparent`** — makes a color transparent; often used to make a transparent background color for an element. Equivalent to `rgba(0,0,0,0)`. [S1]
- **`currentcolor`** — acts like a variable holding the current value of the element's `color` property. [S1]
- **`inherit`** — specifies that a property should inherit its value from its parent element; usable for any CSS property on any HTML element. [S1]

## 🧩 추출된 패턴 (Extracted patterns)
- **Keep-in-sync pattern** — `currentcolor` ties borders, shadows, or backgrounds to the element's text color so they stay consistent. [S1]
- **Parent-derived pattern** — `inherit` (and `currentcolor` reading a parent's `color`) lets a child reuse a value defined upstream. [S1]
- **Transparency pattern** — `transparent` is a named stand-in for a fully transparent color (`rgba(0,0,0,0)`). [S1]

## 📖 세부 내용 (Details)
**CSS Color Keywords**
CSS has some special predefined color keywords that can be used with properties like `color`, `background-color`, and `border-color`. The page identifies three special keywords: `transparent`, `currentcolor`, and `inherit`. [S1]

**The `transparent` Keyword**
The `transparent` keyword is used to make a color transparent. This is often used to make a transparent background color for an element. [S1]
```css
body {
  background-image: url("paper.gif");
}

div {
  background-color: transparent;
}
```
**Note:** The `transparent` keyword is equivalent to `rgba(0,0,0,0)`. RGBA color values are an extension of RGB color values with an alpha channel — which specifies the opacity for a color. [S1]

**The `currentcolor` Keyword**
The `currentcolor` keyword is like a variable that holds the current value of the `color` property of an element. This keyword can be useful if you want a specific color to be consistent in an element or a page. [S1]

In this example the border color of the `<div>` element will be blue, because the text color of the `<div>` element is blue: [S1]
```css
div {
  color: blue;
  border: 10px solid currentcolor;
}
```

In this example the `<div>`'s background color is set to the current color value of the body element: [S1]
```css
body {
  color: purple;
}

div {
  background-color: currentcolor;
}
```

In this example the `<div>`'s border color and shadow color is set to the current color value of the body element: [S1]
```css
body {
 color: green;
}

div {
  box-shadow: 0px 0px 15px currentcolor;
  border: 5px solid currentcolor;
}
```

**The `inherit` Keyword**
The `inherit` keyword specifies that a property should inherit its value from its parent element. The `inherit` keyword can be used for any CSS property, and on any HTML element. [S1]

In this example the `<span>`'s border settings will be inherited from the parent element: [S1]
```css
div {
  border: 2px solid red;
}

span {
  border: inherit;
}
```

**Standard color names:** The full list of 140 standard color names is not detailed on this page; it focuses exclusively on the three special keywords above. (Not found in source on this page.) [S1]

## ⚖️ 비교 및 선택 기준 (Comparison & decision criteria)
Choosing among the special keywords: [S1]
- **`transparent`** — when you want no visible color (e.g., a see-through background); equivalent to `rgba(0,0,0,0)`.
- **`currentcolor`** — when a border/shadow/background should track the element's own (or a parent's) text `color` for visual consistency.
- **`inherit`** — when a property should explicitly take its parent's value, for any property on any element.

## 🛠️ 적용 사례 (Applied in summary)
The page's examples are the applied cases: a transparent `<div>` over a paper background; `currentcolor` driving a border, a background, and a box-shadow + border; and a `<span>` border inheriting from its parent. No external project/commit applications found in the source.

## 💻 코드 패턴 (Code patterns)
Border that tracks the element's text color (language: CSS):
```css
div {
  color: blue;
  border: 10px solid currentcolor;
}
```
Inherit a property from the parent:
```css
span {
  border: inherit;
}
```

## ⚖️ 모순 및 업데이트 (Contradictions & updates)
No contradictions found in the source.

## ✅ 검증 상태 및 신뢰도
- **상태:** draft
- **검증 단계:** conceptual (실제 적용 사례 발견 시 applied/validated로 승격 가능)
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
- **신뢰 점수:** 0.88
- **중복 검사 결과:** 신규 생성 (New discovery)

## 🔗 지식 그래프 (Knowledge Graph)
- **상위/루트:** [[CSS Tutorial]]
- **관련 개념:** [[CSS Colors (CSS3)]], [[CSS Background Clip]], [[CSS Multiple Backgrounds]]
- **참조 맥락:** Referenced when reusing the current text color, inheriting parent values, or creating transparent backgrounds.

## 📚 출처 (Sources)
- [S1] W3Schools — CSS Color Keywords — https://www.w3schools.com/css/css_colors_keywords.asp

## 📝 변경 이력 (Change history)
- 2026-06-23: Initial draft synthesized from the W3Schools "CSS Color Keywords" page (Astra wiki-curation, P-Reinforce v3.1 format).
