Cor e contraste
Converta cores entre HEX, RGB, HSL e OKLCH, e verifique o contraste WCAG 2.1 em fundos claros e escuros.
Roda totalmente no seu navegador: nada do que você cola é enviado.
Texto normal precisa de 4.5 : 1 (AA) ou 7 : 1 (AAA). Texto grande e bordas de interface precisam de 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]Referência de contraste WCAG
referência rápida- 4.5 : 1
- Mínimo para texto de corpo normal no nível AA, até 24px regular ou 18.66px em negrito.
- 3 : 1
- Mínimo AA para texto grande e para bordas e ícones de componentes de interface.
- 7 : 1
- Nível AAA para qualquer tamanho de texto; 4.5 : 1 é AAA para texto grande.
- (L1 + 0.05) / (L2 + 0.05)
- A fórmula de contraste, em que L é a luminância relativa com correção gama.
- #RRGGBBAA
- O hex de oito dígitos adiciona canal alfa; o rgb() do CSS usa 0-255 e alfa de 0-1.
- OKLCH
- Luminosidade e croma perceptualmente uniformes, então passos iguais parecem iguais e os tons mantêm contraste.
Guias de sintaxe de React
Todos os guias de 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.