xyz_to_lab — IMGMETRICS colorspace op

Data kinds: rgblab

Call: import fullseye as fs; fs.ledger.xyz_to_lab(xyz, white=(0.95047, 1.0, 1.08883)) (to call the implementation directly, import imgmetrics; imgmetrics.xyz_to_lab(xyz, white=(0.95047, 1.0, 1.08883)); from the registry, opsimgmetrics.get("xyz_to_lab"))

Usage

CIE XYZ → CIE 1976 L\*a\*b\*. The default white point is D65 2°.

> The detailed description below is the original text — the summary and the headings are translated.

式: `t = XYZ / white として f(t) = cbrt(t)(t > (6/29)^3`)、

それ以外は `t / (3 (6/29)^2) + 4/29L = 116 f(Y) - 16`、

`a = 500 (f(X) - f(Y))b = 200 (f(Y) - f(Z))`。

• `xyz: 最後の軸が 3 の任意の形。rgb_to_xyz` の出力と同じ、Y = 1 が白の尺度。

• `white: 白色点 (Xn, Yn, Zn) の 3 つの正の数。既定 D65_WHITE` =

`(0.95047, 1.0, 1.08883)`。別の光源(D50 など)で撮った XYZ ならここを変える。

• 返り値: 入力と同じ形の float64。`L は白で 100、黒で 0。a/b` は符号つき。

• 失敗(`MetricContractError): 最後の軸が 3 でない / white` が 3 要素でない、

または 0 以下を含む。XYZ の値域は検査しない(負や 1 超もそのまま計算する)。

`delta_e_76 / delta_e_2000` はこの Lab を入力にする。

Detailed usage guide

image_difference_metrics family guide

Background guides (the physics and conventions behind this op)

colorimetry — 測色と分光の知識 — 色は「分光 × 光源 × 観測者」でしか決まらない

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

image_quality_metricspy -3.11 examples/image_quality_metrics.py

Ops the type connects to (they accept lab as input)

lab_to_rgb · delta_e_2000 · delta_e_76

Same category (colorspace)

rgb_to_lab · lab_to_rgb · rgb_to_xyz


*Provenance: imgmetrics.py — IMGMETRICS operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.