Farbe & Kontrast
Farben zwischen HEX, RGB, HSL und OKLCH umrechnen und den WCAG-2.1-Kontrast auf hellem und dunklem Hintergrund prüfen.
Läuft vollständig in Ihrem Browser – nichts, was Sie einfügen, wird hochgeladen.
Normaler Text braucht 4,5 : 1 (AA) oder 7 : 1 (AAA). Großer Text und UI-Rahmen brauchen 3 : 1.
:root {
--color-brand: #3B82F6;
--color-brand-rgb: 59 130 246;
--color-brand-hsl: hsl(217, 91%, 60%);
--color-brand-oklch: oklch(62.3% 0.188 259.8);
}@theme {
--color-brand: #3B82F6;
}
text-brand bg-brand border-brand
text-[#3B82F6] bg-[#3B82F6]WCAG-Kontrastreferenz
Kurzreferenz- 4,5 : 1
- Minimum für normalen Fließtext in Stufe AA, bis 24px regulär oder 18,66px fett.
- 3 : 1
- AA-Minimum für großen Text sowie für Rahmen und Symbole von UI-Komponenten.
- 7 : 1
- Stufe AAA für jede Textgröße; 4,5 : 1 ist AAA für großen Text.
- (L1 + 0,05) / (L2 + 0,05)
- Die Kontrastformel, wobei L die relative Leuchtdichte mit Gammakorrektur ist.
- #RRGGBBAA
- Achtstelliges Hex ergänzt einen Alphakanal; CSS rgb() verwendet 0-255 und Alpha von 0-1.
- OKLCH
- Wahrnehmungsgleichmäßige Helligkeit und Buntheit, gleiche Schritte wirken gleich und Farbtöne behalten den Kontrast.
Passende React-Syntax-Guides
Alle React-GuidesReact 19 Ref Cleanup Functions and forwardRef Deprecation
ref is a normal prop now and a ref callback may return a cleanup function, which breaks every implicit-return callback. Migration steps and the leak it fixes.
ReactReact 19 Hydration Mismatch: Error 418 and 421 Root Causes
React discards the server HTML as soon as the first client render differs. The deterministic-value fixes for #418, the attribute mismatch behind #421, and how to read the diff.
ReactReact Maximum Update Depth Exceeded: Finding the Update Loop
Fifty nested updates and React gives up. The loop is always a new identity: an inline object in a dependency array, a setState in render, or a selector that returns a fresh array.
ReactReact Profiler API: Measuring Render Timings and Identifying Wasted Re-Renders
actualDuration versus baseDuration, phase names that tell you who triggered a commit, and how to ship the numbers without flooding a backend.