XYZ to LAB Color Converter

Free Online CIE XYZ to CIELAB Color Space Conversion Tool

Free ToolInstant ResultsD65 StandardProfessional Quality

Convert CIE XYZ tristimulus values to CIELAB (LAB) color space with our free, accurate online calculator. Perfect for designers, photographers, color scientists, and print professionals who need reliable color space conversions.

Our tool uses the industry-standard D65 illuminant and provides instant, precise results with detailed mathematical explanations and comprehensive technical documentation.

How to Convert XYZ to LAB Colors

1

Enter XYZ Values

Input your CIE XYZ tristimulus values (X, Y, Z) in the converter above

2

Instant Conversion

Get immediate LAB color values using D65 illuminant standard

3

Use Results

Apply the LAB values in your color management workflow

💡 Pro Tip

LAB color space is perceptually uniform, meaning equal distances represent equal perceived color differences. This makes it ideal for color matching, quality control, and calculating color differences (Delta E) in professional applications.

Understanding XYZ to LAB Color Space Conversion

CIE XYZ Color Space

CIE XYZ is the foundation color space defined by the International Commission on Illumination (CIE). It represents colors using three tristimulus values based on human vision response curves and serves as the reference for all other color spaces.

  • X: Red-green axis (0-95.047 for D65)
  • Y: Luminance component (0-100)
  • Z: Blue-yellow axis (0-108.883 for D65)

CIELAB Color Space

CIELAB (LAB) is a perceptually uniform color space where equal distances represent equal perceived color differences. It's designed to be device-independent and closely match human visual perception for accurate color analysis.

  • L*: Lightness (0-100)
  • a*: Green-red axis (-128 to +127)
  • b*: Blue-yellow axis (-128 to +127)

XYZ to LAB Conversion Formula

// Step 1: Normalize XYZ values with D65 illuminant
X_n = X / 95.047
Y_n = Y / 100.000
Z_n = Z / 108.883

// Step 2: Apply nonlinear transformation
f(t) = t > 0.008856 ? t^(1/3) : (7.787 * t + 16/116)

f_x = f(X_n)
f_y = f(Y_n)
f_z = f(Z_n)

// Step 3: Calculate LAB values
L* = 116 * f_y - 16
a* = 500 * (f_x - f_y)
b* = 200 * (f_y - f_z)

Common XYZ to LAB Conversion Examples

Pure Red Color

XYZ Input: X=41.24, Y=21.26, Z=1.93

LAB Output: L*=53.23, a*=80.11, b*=67.22

Standard sRGB red converted to perceptual LAB coordinates

Pure Green Color

XYZ Input: X=35.76, Y=71.52, Z=11.92

LAB Output: L*=87.73, a*=-86.18, b*=83.18

Standard sRGB green showing negative a* (green direction)

Pure Blue Color

XYZ Input: X=18.05, Y=7.22, Z=95.05

LAB Output: L*=32.30, a*=79.19, b*=-107.86

Standard sRGB blue showing negative b* (blue direction)

Pure White (D65)

XYZ Input: X=95.05, Y=100.00, Z=108.88

LAB Output: L*=100.00, a*=0.00, b*=0.00

D65 white point reference showing neutral LAB values

Understanding LAB Values

L* (Lightness):

0 = Black, 100 = White

a* (Green-Red):

Negative = Green, Positive = Red

b* (Blue-Yellow):

Negative = Blue, Positive = Yellow

Programming Implementation

🐍Python - XYZ to LAB Conversion

import numpy as np

def xyz_to_lab(X, Y, Z):
    """Convert CIE XYZ to CIELAB using D65 illuminant"""
    # D65 illuminant white point
    xn, yn, zn = 95.047, 100.000, 108.883

    # Normalize XYZ values
    x_norm = X / xn
    y_norm = Y / yn
    z_norm = Z / zn

    # Apply nonlinear transformation
    def f(t):
        return np.power(t, 1/3) if t > 0.008856 else (7.787 * t + 16/116)

    fx = f(x_norm)
    fy = f(y_norm)
    fz = f(z_norm)

    # Calculate LAB values
    L = 116 * fy - 16
    a = 500 * (fx - fy)
    b = 200 * (fy - fz)

    return L, a, b

# Example usage
xyz = (41.24, 21.26, 1.93)  # Red color
lab = xyz_to_lab(*xyz)
print(f"XYZ{xyz} -> LAB({lab[0]:.2f}, {lab[1]:.2f}, {lab[2]:.2f})")

JavaScript - XYZ to LAB Conversion

function xyzToLab(X, Y, Z) {
    // D65 illuminant white point
    const xn = 95.047, yn = 100.000, zn = 108.883;

    // Normalize XYZ values
    const xNorm = X / xn;
    const yNorm = Y / yn;
    const zNorm = Z / zn;

    // Apply nonlinear transformation
    const f = (t) => {
        return t > 0.008856 ? Math.pow(t, 1/3) : (7.787 * t + 16/116);
    };

    const fx = f(xNorm);
    const fy = f(yNorm);
    const fz = f(zNorm);

    // Calculate LAB values
    const L = 116 * fy - 16;
    const a = 500 * (fx - fy);
    const b = 200 * (fy - fz);

    return { L: L, a: a, b: b };
}

// Example usage
const xyz = { X: 41.24, Y: 21.26, Z: 1.93 };  // Red color
const lab = xyzToLab(xyz.X, xyz.Y, xyz.Z);
console.log(`XYZ(${xyz.X}, ${xyz.Y}, ${xyz.Z}) -> LAB(${lab.L.toFixed(2)}, ${lab.a.toFixed(2)}, ${lab.b.toFixed(2)})`);

Real-World Applications and Use Cases

Design & Photography

  • Color matching between different devices and media
  • Print-to-screen color accuracy verification
  • Photo editing with perceptually uniform adjustments
  • Brand color consistency across platforms

Manufacturing & Quality Control

  • Textile and paint color quality assurance
  • Automotive paint matching and inspection
  • Food industry color standardization
  • Cosmetics color formulation and testing

Scientific Research

  • Color perception and vision research
  • Spectrophotometry data analysis
  • Color appearance modeling studies
  • Psychophysical color experiments

Digital Media & Web

  • Web accessibility color contrast analysis
  • Digital asset color management
  • Video production color grading
  • Game development color systems

Frequently Asked Questions

What is the difference between XYZ and LAB color spaces?

CIE XYZ is a device-independent color space based on human vision, but it's not perceptually uniform. CIELAB (LAB) is derived from XYZ but designed to be perceptually uniform, meaning equal distances in LAB space represent equal perceived color differences. This makes LAB ideal for color difference calculations and quality control applications.

Why do we use D65 illuminant for XYZ to LAB conversion?

D65 illuminant represents average daylight at 6500K and is the standard reference white point for sRGB, most computer displays, and many color management systems. Using D65 ensures compatibility with modern digital workflows and international color standards like ISO 12640 and IEC 61966.

How accurate is this XYZ to LAB converter?

Our converter uses the official CIE formulas with double-precision floating-point arithmetic, providing accuracy suitable for professional applications. The conversion follows the exact mathematical specifications defined in CIE Publication 15:2004, ensuring results match those from professional color management software and spectrophotometers.

Can I use this tool for commercial projects?

Yes, this XYZ to LAB converter is completely free to use for both personal and commercial projects. The conversion algorithms are based on public CIE standards, and there are no usage restrictions. However, for critical applications, we recommend validating results with certified reference materials or professional color measurement equipment.

What are typical XYZ and LAB value ranges?

For D65 illuminant: XYZ values typically range from 0-95.047 (X), 0-100 (Y), and 0-108.883 (Z). LAB values range from 0-100 (L* lightness), approximately -128 to +127 (a* green-red axis), and -128 to +127 (b* blue-yellow axis). Values outside these ranges may indicate colors outside the visible spectrum or calculation errors.

Technical Notes and Best Practices

D65 Illuminant Standard

This converter uses the D65 illuminant (daylight at 6500K) as the reference white point, which is the international standard for sRGB and most modern display systems. The D65 white point coordinates are X=95.047, Y=100.000, Z=108.883.

Industry Standards: D65 is specified in ISO 3664, ISO 12640, and IEC 61966 standards for color management and display calibration.

Perceptual Uniformity Benefits

Converting to CIELAB provides perceptual uniformity, meaning that equal distances in the LAB color space correspond to equal perceived color differences. This makes LAB ideal for color difference calculations, color matching applications, and quality control processes.

Delta E Calculation: Use LAB values to calculate color differences with formulas like ΔE*ab = √[(ΔL*)² + (Δa*)² + (Δb*)²]

Conversion Accuracy and Precision

The conversion involves cube root operations and conditional transformations that require careful numerical handling. Our implementation uses double-precision floating-point arithmetic for professional-grade accuracy.

Typical Accuracy: ±0.01 LAB units for most visible colors, suitable for professional color management applications.

Input Validation and Range Checking

While XYZ can theoretically represent colors outside the visible spectrum, practical applications should validate input ranges. Negative XYZ values or values significantly exceeding the D65 white point may indicate measurement errors.

Recommended Ranges: X: 0-100, Y: 0-100, Z: 0-120 for most practical applications.

Integration with Color Management Systems

When integrating XYZ to LAB conversion into larger color management workflows, ensure consistent illuminant usage throughout the pipeline. Mixed illuminants can cause color shifts and inaccurate results.

Best Practice: Document the illuminant used in each conversion step and provide chromatic adaptation when switching between illuminants.