v137 · canvas · hdr

HDR Gradient Builder

Construct a gradient where stop colors have luminance values above 1.0 — values that only float-16 canvas can represent faithfully. See the gradient on both a float16 and a clamped uint8 canvas, then sample pixels to compare the raw channel values stored in each.

Configure gradient

Stop A

2.50

Stop B

1.50

Sample point

0.30
float16 (HDR)

Float-16 canvas — values > 1.0 preserved

uint8 (SDR clamped)

Uint8 canvas — values clamped to [0, 255]

Pixel samples at selected position

Canvas typeRGBAClamped?
Float16 canvas stores each channel as a 16-bit IEEE 754 half-float, allowing values outside [0, 1] — essential for HDR content. In a typical SDR uint8 canvas, any channel value above 1.0 is clamped to 255. When you set luminance × 2.5, red channel 0.8 becomes 2.0 — faithfully stored in float16, clipped to 1.0 in uint8.

see also