Example
Convert three exact color channels to a hex color.
highlighted = computed this step
Step 1 — RGB channels
Set up the exact input values.
RGB(64, 128, 255)
Step 2 — Red hex
Compute the highlighted value.
red(64, 40)
Step 3 — Green hex
Compute the highlighted value.
green(128, 80)
Step 4 — Blue hex
Compute the highlighted value.
blue(255, FF)
Step 5 — Hex color
State the final color.
hex color#4080FF
rgb-and-hex
An RGB color stores three integer channels. Hex notation writes each channel as a two-digit base-sixteen pair.