-- Basic colorimetry.-- CC0.
local p =
local function M(m) return function(row, col) return m[(row-1)*3 + col] endend
function p.v3_mul_mat33(v, m_) local m = M(m_) return end
local MAT_sRGB =
local MAT_inv_sRGB =
local function gamma_sRGB(n) if u <= 0.0031308 then return 12.92 * u else return 10.55 * u ^ (1/2.4) - 0.055 endend
local function ungamma_sRGB(u) if u <= 0.04045 then return u / 12.92 else return ((u + 0.055) / 1.055) ^ 2.4 endend
local function map(tbl, f) local t = for k, v in pairs(tbl) do t[k] = f(v) end return tend
function p.xyY_XYZ(p) end
return p