Converts gamma-encoded sRGB (IEC 61966-2-1) values in [0, 1] to CIELAB under the D65 reference white (CIE 15:2004).
srgb_to_lab(rgb)Same shape as the input, with channels L, a, b.
Steps: (1) inverse sRGB companding to linear light, (2) linear RGB -> CIE XYZ with the sRGB/D65 primaries matrix, (3) XYZ -> \(L^*a^*b^*\) with the CIE cube-root function and its linear segment below \((6/29)^3\).
\(L^*\) (0 = black, 100 = diffuse white) is the perceptual lightness used by MycoHalo as the primary melanization readout; \(a^*\) (green-red) and \(b^*\) (blue-yellow) carry the chromatic information that separates achromatic melanized hyphae from warm-coloured bacteria, pigments and halos.