---
id: css-colors
title: "CSS Colors"
category: "Frontend"
status: "draft"
verification_status: "conceptual"
canonical_id: ""
aliases: ["CSS color", "color names", "background-color", "RGB HEX HSL", "RGBA HSLA"]
duplicate_of: ""
source_trust_level: "B"
confidence_score: 0.89
created_at: 2026-06-23
updated_at: 2026-06-23
review_reason: ""
merge_history: []
tags: ["css", "web", "frontend", "w3schools", "colors"]
raw_sources: ["https://www.w3schools.com/css/css_colors.asp"]
applied_in: []
github_commit: ""
---

# [[CSS Colors]]

## 🎯 한 줄 통찰 (One-line insight)
CSS colors can be specified using predefined color names or with RGB, HEX, HSL, RGBA, and HSLA values, and are applied through properties such as `color`, `background-color`, and `border`. [S1]

## 🧠 핵심 개념 (Core concepts)
- **Ways to specify color** — predefined color names, or RGB, HEX, HSL, RGBA, and HSLA values. [S1]
- **Standard color names** — CSS/HTML support 140 standard color names (e.g. Tomato, Orange, DodgerBlue, MediumSeaGreen, Gray, SlateBlue, Violet, LightGray). [S1]
- **Where colors apply** — `background-color` sets the background, `color` sets the text color, and `border` can set a colored border. [S1]
- **Transparency** — RGBA and HSLA values add an alpha channel for transparency (e.g. `0.5` = 50% transparent). [S1]

## 🧩 추출된 패턴 (Extracted patterns)
- **Name everywhere** — a single color name (e.g. `Tomato`) can be reused across background, text, and border. [S1]
- **Equivalent representations** — the same color can be expressed as a name, RGB, HEX, HSL, plus RGBA/HSLA with transparency. [S1]

## 📖 세부 내용 (Details)
Colors in CSS can be specified by predefined color names, as well as by RGB, HEX, HSL, RGBA, and HSLA values. CSS/HTML support 140 standard color names. [S1]

**Background Color** — you can set the background color for HTML elements: [S1]
```html
<h1 style="background-color:DodgerBlue;">Hello World</h1>
<p style="background-color:Tomato;">Lorem ipsum...</p>
```

**Text Color** — you can set the color of text: [S1]
```html
<h1 style="color:Tomato;">Hello World</h1>
<p style="color:DodgerBlue;">Lorem ipsum...</p>
<p style="color:MediumSeaGreen;">Ut wisi enim...</p>
```

**Border Color** — you can set the color of borders: [S1]
```html
<h1 style="border:2px solid Tomato;">Hello World</h1>
<h1 style="border:2px solid DodgerBlue;">Hello World</h1>
<h1 style="border:2px solid Violet;">Hello World</h1>
```

**Color Values** — colors can also be specified using RGB values, HEX values, HSL values, RGBA values, and HSLA values. The following representations all define the same color (`Tomato`): [S1]

| Format | Value |
| --- | --- |
| RGB | `rgb(255, 99, 71)` |
| HEX | `#ff6347` |
| HSL | `hsl(9, 100%, 64%)` |
| RGBA (50% transparent) | `rgba(255, 99, 71, 0.5)` |
| HSLA (50% transparent) | `hsla(9, 100%, 64%, 0.5)` |

You will learn more about RGB, HEX, and HSL in the next chapters. [S1]

## 🛠️ 적용 사례 (Applied in summary)
The page's own examples apply colors to headings and paragraphs via `background-color`, `color`, and `border`, and show `Tomato` expressed in five value formats. No external project/commit applications found in the source.

## 💻 코드 패턴 (Code patterns)
Applying named colors to background, text, and border (language: HTML):
```html
<h1 style="background-color:DodgerBlue;">Hello World</h1>
<h1 style="color:Tomato;">Hello World</h1>
<h1 style="border:2px solid Violet;">Hello World</h1>
```
Equivalent value formats for one color (language: CSS):
```css
/* all define Tomato */
rgb(255, 99, 71)
#ff6347
hsl(9, 100%, 64%)
rgba(255, 99, 71, 0.5)   /* 50% transparent */
hsla(9, 100%, 64%, 0.5)  /* 50% transparent */
```

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

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

## 🔗 지식 그래프 (Knowledge Graph)
- **상위/루트:** [[CSS Tutorial]]
- **관련 개념:** [[CSS Syntax]], [[CSS Add Inline]], [[CSS Introduction]]
- **참조 맥락:** Referenced whenever specifying any color value for text, backgrounds, or borders.

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

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