Articles
Articles

Notes on color science, pixel formats, and LLM inference.

Technical notes from Polyverse's graphics and inference work: original research, reference values, and where standards and common practice quietly diverge.

Research our own work and measurements Reference standards and derivations, worked through Review other people's work, explained and compared

Research

Blue Noise Token Sampling

Sampling error is quantization error. How dithering research became a generative blue noise RNG, and what happens when llama.cpp token sampling stops drawing white noise.

Livebit streamswalk the tree8-bit waveformsampler draws
// blue noise · LLM sampling · llama.cpp

Read article →

Draft · pre-published · under review
Research

From Stateful to Stateless Blue Noise

Five states, seven, one bit, none. Four forms of the blue noise tree generator, and the two chance findings that led to them. The smallest stores nothing and can compute any sample directly.

Livewrapped streamstep the machinessix ways to hold an errorspectraslope against thresholdblocks and binsindex to sample
// blue noise · state machines · low discrepancy

Read the draft →

Research

Chroma Rotation Averaging

Match the colors, not the channels. Histogram matching along six directions of the chroma plane, so an upscaler's drifted colors come back without its dark blues turning purple.

Liveper-channel curvesstep through itgrading suiteyour own pictures
// histogram matching · color transfer · upscaling

Read article →

ABCABCAB
uint3 ABC → uint8 ABCABCAB
ABCDEFGHABCDEFGH
uint8 → uint16, replicated
0xFF00 → 0xFF truncated, 0xFE rounded
Reference

Integer Color Format Conversion Relations

Bit replication, truncation, and float conversion between integer color formats. Why uint8 and uint16 are canonical, and why rounding during truncation is incorrect.

Liveconversion labreduction lab
// bit depth · RGB565 · RGB332

Read article →

Reference

Color Space Specification

Authoritative definitions and derived values for sRGB, CIELAB, OKLab, Y′CbCr, and related color spaces. What each standard actually defines, and what is merely derived.

Livederive the matricestransfer functionsround tripsY′CbCr pickerOKLab pickerApple RGBcolor differenceslightnessone color through the graphBradford
// sRGB · CIELAB · OKLab

Read article →

Draft · pre-published · under review
Reference

The D65 Whitepoint

Precision, history, and derivation of the standard daylight illuminant. Temperature scales, the daylight locus, and which chromaticity values are authoritative for which purpose.

Livewhere is D65?which temperature?mix a daylightintegrate it yourselfa slightly different D65
// D65 · CIE · illuminants

Read article →

Pixel formats and textures

Get the numbers right

  1. Integer Color Format Conversion Relations
  2. Color Space Specification
Color science

From spaces to white points

  1. Color Space Specification
  2. The D65 Whitepoint draft

Articles were written using AI assistance and fully verified against the relevant standards and sources.