Home / Blog / Color & design

Color values & contrast

Water Blue Hex

Inspect #74CCF4 as RGB(116, 204, 244), see a working CSS example, and verify contrast and opacity before using the color.

Water Blue Hex

This water-blue example is #74CCF4. Water does not have one fixed screen color, so this is a design sample rather than a physical measurement.

Exact values for this swatch

RepresentationValue
Six-digit hex#74CCF4
RGB channelsrgb(116 204 244)
Approximate HSLhsl(198.75 85.33% 70.59%)

The red pair is 74, the green pair is CC, and the blue pair is F4. Interpreting each pair in base sixteen gives 116, 204 and 244 respectively. The channels are integers from zero to 255. This color has no exact three-digit shorthand because at least one channel pair contains two different digits.

Use the value in a real CSS example

.sample {
  background-color: #74CCF4;
  color: #000000;
  border: 2px solid currentColor;
  padding: 1rem;
}

Apply this class to an element containing actual sample text and inspect it in the browser. The background and foreground are specified separately. A valid color value does not automatically style every part of a component: links, borders, icons, disabled controls and hover states may use other rules. Inspect the computed style if the displayed color differs from the value you entered.

Check this color against its background

Using the WCAG sRGB relative-luminance formula, this opaque swatch has approximately 11.69:1 contrast against black and 1.80:1 against white. The example chooses #000000 text, giving approximately 11.69:1. These figures compare two flat, opaque colors. They do not automatically describe text placed over a photograph, gradient or translucent overlay.

For ordinary text, WCAG’s minimum contrast criterion uses 4.5:1; qualifying large text uses 3:1. Check the applicable text size and weight, and test the actual foreground/background pair with Color Contrast Checker. Do not round a value below the threshold upward to declare a pass. A passing ratio addresses one criterion and does not establish complete accessibility or legal compliance for a page.

The computed relative luminance for this sample is approximately 0.53430 on the normalized zero-to-one scale. That value comes from linearizing the sRGB channels and weighting them, not from averaging 116, 204 and 244. If you adjust this swatch, recalculate the resulting pair rather than assuming that equal numeric changes in different channels have equal effects on contrast.

Keep opacity and channel order explicit

A six-digit hex code has no separate alpha channel and represents an opaque sRGB color. In CSS, an eight-digit hex color uses the order red, green, blue, alpha. Other environments can use alpha first, so copying an eight-digit value between platforms without checking its convention can change both color and opacity. Test a partially transparent sample over at least two different backgrounds to reveal accidental alpha mistakes.

Case does not change a hexadecimal color: uppercase and lowercase digits encode the same values. Leading zeros do matter, however. Keep exactly the required number of digits, and include the leading hash where the receiving format expects CSS notation. A field asking for an RGB triple may want decimal channel values instead of a hash-prefixed string; consult the field’s actual format rather than repeatedly pasting an incompatible value.

Verify the saved color and its limits

Enter the hex value in Hex to RGB, compare its three decimal channels with the table, and then convert the channels back to hex. That round trip should reproduce the same six-digit value. When the display uses rounded HSL values, a small round-trip channel difference can result from rounding, so retain hex or integer RGB as the exact reference for this sample.

A screen swatch is not a print, paint or textile match. Device calibration, color profiles, surrounding colors and lighting affect appearance. CMYK output requires a printing condition and color-management workflow; a named physical product requires its own verified specification or sample. Do not label a convenient on-screen approximation as an official brand formula. Keep the original numeric value, color space and intended role with the design so later edits remain traceable.

Primary references

CSS hexadecimal color notation and WCAG contrast minimum explanation.