Move an opaque color into a CSS format
Convert a known opaque value and compare the channels. This converter does not composite translucent colors against a background.
Debug APIs, clean content, format data, and run release checks directly in your browser.
Focused on Color & Design with 3 tools. Use search to narrow down quickly.
Filter by Focus
Converting HEX to RGB preserves a color value. Generating a palette proposes combinations. Contrast checking measures one foreground/background pair; none of these operations can substitute for the others.
Convert a known opaque value and compare the channels. This converter does not composite translucent colors against a background.
Generate five RGB shades from a base HEX color, then test the specific pairs you intend to use for text and controls.
Measure the actual foreground/background pair. Palette harmony and visual preference do not establish a readable contrast ratio.
#000000 = rgb(0, 0, 0) #ffffff = rgb(255, 255, 255) Opaque black on opaque white: 21:1
Use the black/white pair to confirm you selected the intended inputs. Then replace both with the real colors. For WCAG 2.x AA text checks, the usual thresholds are 4.5:1 for normal text and 3:1 for qualifying large text.
Contrast of a flat pair does not evaluate gradients, images, focus indicators, font rendering or the accessibility of the whole page.