Jonathan. Frech’s WebBlog

On the Search for a Rain­bow (#302)

Jonathan Frech,

Colour is so much more than one’s screen manufacturer’s idiosyncratic choice subject to calibration precision of electromagnetically reifying 24 bits.

Earlier yesterday, I marvelled at the cherryblossom hues with which the rising sun had dyed long strands of cloud, all peeking in­clined in synchrony be­hind lush greens of hilltop, set in front a greyish-lightblue sky. The writ­ten word will on­ly illicit an inkling of that fleeting moment, an every painting fashioned to eternalize its makeup destined to re-dress an incomplete assessment. Where­as the pig­ment lying thick atop the canvas envisages the very same sun which brought about the scene as aid to once again pay trib­ute to times gone by, discretized renderings must dread to contemplate their own form, for there is no salvation from fakery.

It’s not the semiotic bluff which weighs heavy on the ontology of hues: let lan­guage not be of concern, consider every word opaque with­out bounds! Can I perceive polarized light? Is Olo a colour? Does time play a part in the colour of oil films, their ripples precluding a stat­ic view? Are holographic elements on Euro bills a colour? Is anthracite a material prop­er­ty unique to pure coke of coal or a colour? What colour is a polished petrol autobody? Can non-iridescent nanostructures be considered a colour? Do LCD viewing angles change the screen’s colour? Is green perceivable by the majority of earthly life because it is near the maximum of the unimodal black body emission of our sun? When the winding tightness of the topological covering of the electromagnetic frequencies in com­mon use depends on Goethe’s colour per­cep­tion over a cen­tu­ry ago, do trichromats then perceive dif­fer­ent breadths of the elusive pink, a dis­con­tin­u­ous il­lu­sion be­tween wide and narrow waves? We know that the image’s framing can trigger perceptive heu­ris­tics that alter our ex­pe­ri­ence. Does it go as far as that my believes in where­from I watch nature unfurl changes the colours I see? What beauty am I never to wit­ness due to not being born a tet­ra­chromat?

Noon’s sun through a prism onto the floor of by brother’s bedroom. Photo by Jonathan Frech, 2026-09-04 (colours lightly edited).

My father was in need of a graph­ic illustrating the visible spec­trum, which is hard to draw by hand⸺he had tried.
Back when I was in middle school, I remember some of my classmates, al­ways boys, not being able to order their, or anyone else’s, coloured pencils according to the rain­bow⸺where black, white and grey­scale where put at the desginated desaturated left, yet brown was al­ways a curious outlier.

Since at least 1992 (Levkowitz and Herman 1993) we know how to subdivide the sun’s spec­trum into six equi­dis­tant parts and linearly interweave the three additive primaries (Pseudonymous “Goffrie” 2006), which all modern output devices happily emit back. Though band­ing occurs at those interpolation nodes, and the perceptive gradients are irregularly non-linear.

HSL’s rain­bow: Hue from left to right ranging from 0 ° to 360 °, saturation con­stant 1 and luminosity con­stant 0.5. Ren­der­ing by Jonathan Frech, 2026-09-05 (cf. rain­bow.go).

I had im­ple­ment­ed hsl2rgb back in 2020, in C, and used it to colour in my homepage’s sections’ initial, pixel-stylized letters. Though HSL being as stan­dard as it is, I had played with and im­ple­ment­ed the con­ver­sion rou­tine for said colour space already years prior, cf. Rainbowify.

Cu­ri­ous­ly, photographing a prism held in intense noon sunlight isn’t as picturesque as certainly I had sur­mised it to be, or maybe better put isn’t as egalitarian in its divvying out space for white’s split constituents to rest. Whether the discoloured stripes (faintly visible within the green, orange and darker blue regions in the pho­to­graph above; more visible in oth­er, less blurred photographs my father took of the prism’s spec­trum, which aren’t shown here) are our sun’s Frauenhofer lines or the prim’s glass’ material ab­sorp­tion char­ac­ter­is­tics, irregularities in the CMOS sensor, miscalibration of the monitors I looked through or some­thing else alltogether, I do not know.

Björn Ottosson’s Oklab (Ottosson 2020), one of the great success stories of an open internet of this de­cade, is the con­tem­po­rar­i­ly accepted an­swer to esthetic hiccoughs in colour gradients, and I thought it would surely define an impeccable rain­bow.

Oklab’s rain­bow: Polar LCh coordinates with lightness con­stant 0.75, chroma con­stant 0.25 and hue from left to right ranging from 0 to 2 π. Ren­der­ing by Jonathan Frech, 2026-09-05 (cf. rain­bow.go).

After some time tweaking lightness and chroma constants (HSL’s choice of full saturation and dead-middle luminosity leads to obviously improper Oklab results) paired with the usual ab­surd­ist graph­ics bugs that come from pixel data over­flow, and after stopping to in­ter­pret linear sRGB as graph­ics formats’ RGB pixel values, I arrived at the pastel gradient seen above. Less garish than HSL’s rain­bow.
What’s missing from the Oklab rain­bow are vi­brant reds and vi­brant blues, which both are visible in the pho­to­graph of our sun’s spec­trum, so their vibrancy cannot be a learnt ex­pec­ta­tion from decades of viewing HSL-powered imagery. More disappointingly, band­ing or uneven patches still exist, al­though less severe in appearance. Yet these might be due to a plethora of reasons, including but not limited to my tech stack’s ren­der­ing pipeline being optimized for a HSL-first world, or nei­ther my monitor nor my operating sys­tem nor my image viewer nor my image format decoding li­brary being properly per­cep­tu­al­ly cal­i­brated. Or my room’s light scatter med­dling with how I see my rendered spec­trum.