---
id: css-text-color
title: "CSS Text Color"
category: "Frontend"
status: "draft"
verification_status: "conceptual"
canonical_id: ""
aliases: ["text color", "color property", "CSS color", "font color", "text and background color"]
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", "text", "color"]
raw_sources: ["https://www.w3schools.com/css/css_text.asp"]
applied_in: []
github_commit: ""
---

# [[CSS Text Color]]

## 🎯 한 줄 통찰 (One-line insight)
The CSS `color` property sets the color of text using a color name, a HEX value, or an RGB value, and good contrast against the background is essential for readability. [S1]

## 🧠 핵심 개념 (Core concepts)
- **`color` sets text color** — the `color` property specifies the color of text. [S1]
- **Three value methods** — color names (e.g., `red`), HEX values (e.g., `#ff0000`), or RGB values (e.g., `rgb(255,0,0)`). [S1]
- **Text + background pairing** — text color is commonly set alongside `background-color`. [S1]
- **Contrast matters** — high contrast between text and background color (or background image) is very important for people with vision problems. [S1]

## 🧩 추출된 패턴 (Extracted patterns)
- **Per-element color pattern** — assign distinct `color` values to `body`, `h1`, `h2`, etc., to style text hierarchically. [S1]
- **Foreground/background pairing pattern** — set both `background-color` and `color` on the same selector to ensure a readable, high-contrast combination. [S1]

## 📖 세부 내용 (Details)
The page introduces CSS properties for styling and formatting text. The `color` property sets text color through three methods: color names (e.g., "red"), HEX values (e.g., "#ff0000"), or RGB values (e.g., "rgb(255,0,0)"). [S1]

**Example 1 — Basic text colors:** [S1]
```css
body {
  color: blue;
}

h1 {
  color: green;
}

h2 {
  color: red;
}
```

**Example 2 — Text and background colors:** [S1]
```css
body {
  background-color: lightgrey;
  color: blue;
}

h1 {
  background-color: black;
  color: white;
}

div {
  background-color: blue;
  color: white;
}
```

**Note:** "High contrast is very important for people with vision problems. So, always ensure that the contrast between the text color and the background color (or background image) is good!" [S1]

**Property reference table:** [S1]

| Property | Description |
|----------|-------------|
| color | Specifies the color of text |

## 🛠️ 적용 사례 (Applied in summary)
The page's own examples are the applied cases: setting per-element text colors, and pairing text color with background color across `body`, `h1`, and `div`. No external project/commit applications found in the source.

## 💻 코드 패턴 (Code patterns)
Text color pattern (language: CSS):
```css
selector {
  color: <color-name | #HEX | rgb(r,g,b)>;
}
```
Concrete example:
```css
h1 {
  color: green;
}
```

## ⚖️ 모순 및 업데이트 (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 Text Alignment]], [[CSS Colors]], [[CSS Background]]
- **참조 맥락:** The starting point of the CSS Text Formatting series; referenced whenever setting the color of textual content.

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

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