A comprehensive guide to the CIE (International Commission on Illumination) - the global authority on light, illumination, color, and color spaces, establishing fundamental standards for colorimetry and color measurement used in digital imaging and color conversion.
The CIE (Commission Internationale de l'Éclairage), or International Commission on Illumination, is the global authority on light, illumination, color, and color spaces. Established in 1913, the CIE has developed fundamental standards and methodologies that form the foundation of modern colorimetry, color measurement, and color reproduction technologies used throughout digital imaging and color conversion applications.
The CIE has established the mathematical and scientific foundations for understanding and measuring color, creating standardized methods that enable consistent color reproduction across different devices, media, and applications.
// CIE color science implementation and utilities
class CIEColorScience {
constructor() {
// CIE standard illuminants (normalized to Y=100)
this.standardIlluminants = {
'A': { x: 0.44757, y: 0.40745, description: 'Incandescent tungsten (2856K)' },
'D50': { x: 0.34567, y: 0.35850, description: 'Horizon daylight (5003K)' },
'D65': { x: 0.31271, y: 0.32902, description: 'Noon daylight (6504K)' },
'E': { x: 0.33333, y: 0.33333, description: 'Equal energy illuminant' }
};
// CIE color spaces
this.colorSpaces = {
'XYZ': { description: 'CIE 1931 XYZ color space - fundamental tristimulus space' },
'xyY': { description: 'CIE 1931 chromaticity coordinates with luminance' },
'Lab': { description: 'CIE 1976 L*a*b* perceptually uniform color space' },
'Luv': { description: 'CIE 1976 L*u*v* perceptually uniform color space' }
};
}
// Convert CIE XYZ to chromaticity coordinates
XYZToxyY(X, Y, Z) {
const sum = X + Y + Z;
if (sum === 0) return { x: 0, y: 0, Y: 0 };
return {
x: X / sum,
y: Y / sum,
Y: Y
};
}
// Convert chromaticity coordinates to CIE XYZ
xyYToXYZ(x, y, Y) {
if (y === 0) return { X: 0, Y: 0, Z: 0 };
const X = (x * Y) / y;
const Z = ((1 - x - y) * Y) / y;
return { X, Y, Z };
}
// Calculate color difference using CIE Delta E formulas
calculateDeltaE(lab1, lab2, formula = 'CIE2000') {
switch (formula) {
case 'CIE76':
return this.deltaE76(lab1, lab2);
case 'CIE94':
return this.deltaE94(lab1, lab2);
case 'CIE2000':
return this.deltaE2000(lab1, lab2);
default:
return this.deltaE2000(lab1, lab2);
}
}
deltaE76(lab1, lab2) {
const deltaL = lab1.L - lab2.L;
const deltaA = lab1.a - lab2.a;
const deltaB = lab1.b - lab2.b;
return Math.sqrt(deltaL * deltaL + deltaA * deltaA + deltaB * deltaB);
}
deltaE94(lab1, lab2, textiles = false) {
const kL = textiles ? 2 : 1;
const k1 = textiles ? 0.048 : 0.045;
const k2 = textiles ? 0.014 : 0.015;
const deltaL = lab1.L - lab2.L;
const deltaA = lab1.a - lab2.a;
const deltaB = lab1.b - lab2.b;
const c1 = Math.sqrt(lab1.a * lab1.a + lab1.b * lab1.b);
const c2 = Math.sqrt(lab2.a * lab2.a + lab2.b * lab2.b);
const deltaC = c1 - c2;
const deltaH = Math.sqrt(deltaA * deltaA + deltaB * deltaB - deltaC * deltaC);
const sL = 1;
const sC = 1 + k1 * c1;
const sH = 1 + k2 * c1;
const term1 = deltaL / (kL * sL);
const term2 = deltaC / sC;
const term3 = deltaH / sH;
return Math.sqrt(term1 * term1 + term2 * term2 + term3 * term3);
}
deltaE2000(lab1, lab2) {
// Simplified CIE Delta E 2000 implementation
const deltaL = lab2.L - lab1.L;
const c1 = Math.sqrt(lab1.a * lab1.a + lab1.b * lab1.b);
const c2 = Math.sqrt(lab2.a * lab2.a + lab2.b * lab2.b);
const deltaE = Math.sqrt(
Math.pow(deltaL, 2) +
Math.pow(lab1.a - lab2.a, 2) +
Math.pow(lab1.b - lab2.b, 2)
);
return deltaE;
}
// Calculate correlated color temperature
calculateCCT(x, y) {
// McCamy's approximation for correlated color temperature
const n = (x - 0.3320) / (0.1858 - y);
const cct = 449 * Math.pow(n, 3) + 3525 * Math.pow(n, 2) + 6823.3 * n + 5520.33;
return Math.max(1000, Math.min(25000, cct));
}
// Generate CIE chromaticity diagram data
generateChromaticityDiagram() {
const diagram = {
spectralLocus: [],
whitePoints: {},
colorSpaceGamuts: {}
};
// Add standard illuminant white points
Object.keys(this.standardIlluminants).forEach(illuminant => {
const wp = this.standardIlluminants[illuminant];
diagram.whitePoints[illuminant] = { x: wp.x, y: wp.y, description: wp.description };
});
return diagram;
}
// CIE standard observer functions
getStandardObserver(type = '2deg') {
return {
type,
description: type === '2deg' ? 'CIE 1931 2° Standard Observer' : 'CIE 1964 10° Standard Observer',
fieldOfView: type === '2deg' ? '2 degrees' : '10 degrees',
application: type === '2deg' ? 'General colorimetry' : 'Large field colorimetry'
};
}
// Color rendering index calculation
calculateCRI(lightSpectrum, referenceIlluminant = 'D65') {
// Simplified CRI calculation
// Full implementation requires 14 test color samples
const testColors = [
{ name: 'Light greyish red', lab: { L: 40, a: 51, b: 26 } },
{ name: 'Dark greyish yellow', lab: { L: 61, a: 26, b: 48 } },
{ name: 'Strong yellow green', lab: { L: 81, a: -4, b: 79 } },
{ name: 'Moderate yellowish green', lab: { L: 72, a: -23, b: 57 } }
];
let totalScore = 0;
testColors.forEach(color => {
// Simulate color under test light vs reference
const testAppearance = this.simulateColorAppearance(color.lab, lightSpectrum);
const refAppearance = this.simulateColorAppearance(color.lab, referenceIlluminant);
const deltaE = this.calculateDeltaE(testAppearance, refAppearance, 'CIE94');
const score = Math.max(0, 100 - 4.6 * deltaE);
totalScore += score;
});
return totalScore / testColors.length;
}
simulateColorAppearance(lab, illuminant) {
// Simplified color appearance simulation
// In practice, this would involve complex chromatic adaptation
return lab; // Placeholder
}
}The fundamental tristimulus color space based on human color vision. All other color spaces can be mathematically derived from XYZ coordinates.
Chromaticity coordinates (x, y) with luminance (Y), useful for color specification and the famous CIE chromaticity diagram.
Perceptually uniform color space where equal distances represent equal perceived color differences. Widely used in color management and quality control.
Alternative perceptually uniform color space, particularly useful for additive color systems like displays.
Explore these comprehensive pillar articles related to CIE (Commission Internationale de l'Éclairage)
A comprehensive guide to tetradic color schemes - sophisticated four-color harmonies that use two complementary pairs arranged in rectangular or square formations on the color wheel, providing maximum color variety while maintaining structured relationships essential for dynamic design compositions, brand systems, and advanced color theory applications.
A comprehensive guide to split-complementary color schemes - sophisticated three-color harmonies that combine a base color with two colors adjacent to its complement, creating balanced visual contrast with reduced tension compared to direct complementary pairs, essential for refined design compositions, brand identity systems, and advanced color theory applications.
A comprehensive guide to color theory, its fundamental principles, and practical applications in digital design and web development.
Comprehensive guide to complementary colors - opposing hues on the color wheel that create maximum visual contrast, dynamic tension, and powerful design impact through scientific color relationships and perceptual phenomena.
Discover more about CIE (Commission Internationale de l'Éclairage) and related color theory concepts
A comprehensive guide to split-complementary color schemes - sophisticated three-color harmonies that combine a base color with two colors adjacent to its complement, creating balanced visual contrast with reduced tension compared to direct complementary pairs, essential for refined design compositions, brand identity systems, and advanced color theory applications.
A comprehensive guide to tetradic color schemes - sophisticated four-color harmonies that use two complementary pairs arranged in rectangular or square formations on the color wheel, providing maximum color variety while maintaining structured relationships essential for dynamic design compositions, brand systems, and advanced color theory applications.
Comprehensive guide to analogous color schemes - adjacent hues on the color wheel that create natural harmony, visual cohesion, and sophisticated design solutions through subtle color relationships and graduated transitions.
A comprehensive guide to color theory, its fundamental principles, and practical applications in digital design and web development.
Comprehensive guide to complementary colors - opposing hues on the color wheel that create maximum visual contrast, dynamic tension, and powerful design impact through scientific color relationships and perceptual phenomena.
A comprehensive guide to monochromatic color schemes - sophisticated single-hue harmonies that create unified visual experiences through systematic variations in saturation, lightness, and tonal relationships, essential for elegant design compositions, brand consistency, and advanced color theory applications requiring cohesive aesthetic unity.
Discover more color terminology and concepts in our comprehensive glossary.
Browse Full Glossary