Couleur et contraste
Convertissez des couleurs entre HEX, RGB, HSL et OKLCH, et vérifiez le contraste WCAG 2.1 sur fond clair et sombre.
S'exécute entièrement dans votre navigateur : rien de ce que vous collez n'est téléversé.
Le texte normal exige 4,5 : 1 (AA) ou 7 : 1 (AAA). Le grand texte et les bordures d'interface exigent 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]Référence de contraste WCAG
référence rapide- 4,5 : 1
- Minimum pour le texte courant au niveau AA, jusqu'à 24 px normal ou 18,66 px gras.
- 3 : 1
- Minimum AA pour le grand texte et pour les bordures et icônes des composants d'interface.
- 7 : 1
- Niveau AAA pour toute taille de texte ; 4,5 : 1 est AAA pour le grand texte.
- (L1 + 0,05) / (L2 + 0,05)
- La formule de contraste, où L est la luminance relative corrigée en gamma.
- #RRGGBBAA
- L'hexadécimal à huit chiffres ajoute un canal alpha ; le rgb() CSS utilise 0-255 et un alpha de 0-1.
- OKLCH
- Luminosité et chroma perceptuellement uniformes : des pas égaux se voient égaux et les teintes gardent leur contraste.
Guides de syntaxe React
Tous les guides ReactReact 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.