A comprehensive guide to wide color gamut displays and color spaces - technologies that can reproduce a significantly larger range of colors than traditional sRGB, enabling more vibrant and accurate color reproduction in modern displays, photography, and digital content creation.
Wide Color Gamut (WCG) refers to display technologies and color spaces that can reproduce a significantly larger range of colors than traditional sRGB. These systems can display more vibrant, saturated colors and provide better color accuracy, particularly for professional photography, video production, and modern digital content. Wide color gamut is becoming increasingly important as display technology advances and content creators demand more accurate color reproduction.
Traditional displays typically cover only the sRGB color space, which represents about 35% of visible colors. Wide color gamut displays can cover 90% or more of the DCI-P3 color space and significant portions of Rec.2020, dramatically expanding the range of reproducible colors.
// Wide color gamut analysis and management system
class WideColorGamutManager {
constructor() {
// Color space definitions with gamut coverage
this.colorSpaces = {
'sRGB': {
name: 'Standard RGB',
whitePoint: 'D65',
primaries: {
red: { x: 0.6400, y: 0.3300 },
green: { x: 0.3000, y: 0.6000 },
blue: { x: 0.1500, y: 0.0600 }
},
coverage: {
visible: 35.9,
adobeRGB: 82.8,
dciP3: 68.7,
rec2020: 35.9
},
gamma: 2.2,
applications: ['Web', 'Standard displays', 'Consumer photography']
},
'Adobe RGB': {
name: 'Adobe RGB (1998)',
whitePoint: 'D65',
primaries: {
red: { x: 0.6400, y: 0.3300 },
green: { x: 0.2100, y: 0.7100 },
blue: { x: 0.1500, y: 0.0600 }
},
coverage: {
visible: 50.6,
adobeRGB: 100.0,
dciP3: 87.4,
rec2020: 63.3
},
gamma: 2.2,
applications: ['Print production', 'Professional photography', 'Graphic design']
},
'DCI-P3': {
name: 'DCI-P3',
whitePoint: 'DCI',
primaries: {
red: { x: 0.6800, y: 0.3200 },
green: { x: 0.2650, y: 0.6900 },
blue: { x: 0.1500, y: 0.0600 }
},
coverage: {
visible: 45.5,
adobeRGB: 87.8,
dciP3: 100.0,
rec2020: 70.8
},
gamma: 2.6,
applications: ['Digital cinema', 'High-end displays', 'Content creation']
},
'Display P3': {
name: 'Display P3',
whitePoint: 'D65',
primaries: {
red: { x: 0.6800, y: 0.3200 },
green: { x: 0.2650, y: 0.6900 },
blue: { x: 0.1500, y: 0.0600 }
},
coverage: {
visible: 45.5,
adobeRGB: 87.8,
dciP3: 100.0,
rec2020: 70.8
},
gamma: 2.2,
applications: ['Apple displays', 'Mobile devices', 'Consumer wide gamut']
},
'Rec.2020': {
name: 'Rec.2020 (UHDTV)',
whitePoint: 'D65',
primaries: {
red: { x: 0.7080, y: 0.2920 },
green: { x: 0.1700, y: 0.7970 },
blue: { x: 0.1310, y: 0.0460 }
},
coverage: {
visible: 75.8,
adobeRGB: 100.0,
dciP3: 100.0,
rec2020: 100.0
},
gamma: 2.4,
applications: ['UHDTV', 'Future displays', 'HDR content']
},
'ProPhoto RGB': {
name: 'ProPhoto RGB',
whitePoint: 'D50',
primaries: {
red: { x: 0.7347, y: 0.2653 },
green: { x: 0.1596, y: 0.8404 },
blue: { x: 0.0366, y: 0.0001 }
},
coverage: {
visible: 90.0,
adobeRGB: 100.0,
dciP3: 100.0,
rec2020: 100.0
},
gamma: 1.8,
applications: ['Professional photography', 'High-end printing', 'Archival work']
}
};
// Display technologies and their typical gamut coverage
this.displayTechnologies = {
'Standard LCD': {
typical_sRGB: 95,
typical_P3: 65,
typical_rec2020: 35,
backlight: 'CCFL or LED',
cost: 'low'
},
'Wide Gamut LCD': {
typical_sRGB: 100,
typical_P3: 95,
typical_rec2020: 70,
backlight: 'Quantum Dot or enhanced LED',
cost: 'medium'
},
'OLED': {
typical_sRGB: 100,
typical_P3: 98,
typical_rec2020: 75,
backlight: 'Self-emissive',
cost: 'high'
},
'Mini-LED': {
typical_sRGB: 100,
typical_P3: 100,
typical_rec2020: 85,
backlight: 'Mini-LED with local dimming',
cost: 'high'
},
'MicroLED': {
typical_sRGB: 100,
typical_P3: 100,
typical_rec2020: 95,
backlight: 'Self-emissive',
cost: 'very high'
}
};
}
// Calculate gamut volume in CIE LAB space
calculateGamutVolume(colorSpace) {
const space = this.colorSpaces[colorSpace];
if (!space) {
throw new Error(`Unknown color space: ${colorSpace}`);
}
// Convert primaries to XYZ then LAB for volume calculation
const primaries = space.primaries;
const whitePoint = this.getWhitePointXYZ(space.whitePoint);
const redXYZ = this.chromaticityToXYZ(primaries.red.x, primaries.red.y, 100);
const greenXYZ = this.chromaticityToXYZ(primaries.green.x, primaries.green.y, 100);
const blueXYZ = this.chromaticityToXYZ(primaries.blue.x, primaries.blue.y, 100);
const redLAB = this.xyzToLab(redXYZ, whitePoint);
const greenLAB = this.xyzToLab(greenXYZ, whitePoint);
const blueLAB = this.xyzToLab(blueXYZ, whitePoint);
// Calculate triangular area in a* b* plane (simplified)
const area = Math.abs(
(redLAB.a * (greenLAB.b - blueLAB.b) +
greenLAB.a * (blueLAB.b - redLAB.b) +
blueLAB.a * (redLAB.b - greenLAB.b)) / 2
);
return {
area2D: area,
volume3D: area * 100, // Simplified volume estimate
colorSpace,
primaries: { red: redLAB, green: greenLAB, blue: blueLAB }
};
}
// Compare gamut coverage between color spaces
compareGamuts(space1, space2) {
const gamut1 = this.calculateGamutVolume(space1);
const gamut2 = this.calculateGamutVolume(space2);
const coverage1 = this.colorSpaces[space1].coverage;
const coverage2 = this.colorSpaces[space2].coverage;
return {
space1: {
name: space1,
volume: gamut1.volume3D,
coverage: coverage1
},
space2: {
name: space2,
volume: gamut2.volume3D,
coverage: coverage2
},
volumeRatio: gamut2.volume3D / gamut1.volume3D,
coverageComparison: {
visible: coverage2.visible / coverage1.visible,
adobeRGB: coverage2.adobeRGB / coverage1.adobeRGB,
dciP3: coverage2.dciP3 / coverage1.dciP3,
rec2020: coverage2.rec2020 / coverage1.rec2020
},
recommendation: this.generateGamutRecommendation(space1, space2)
};
}
generateGamutRecommendation(space1, space2) {
const coverage1 = this.colorSpaces[space1].coverage;
const coverage2 = this.colorSpaces[space2].coverage;
if (coverage2.visible > coverage1.visible * 1.2) {
return `${space2} provides significantly wider color reproduction than ${space1}`;
} else if (coverage2.visible > coverage1.visible * 1.05) {
return `${space2} offers moderately improved color reproduction over ${space1}`;
} else {
return `${space1} and ${space2} provide similar color reproduction capabilities`;
}
}
// Analyze display capability for wide color gamut
analyzeDisplayCapability(displayTech, targetColorSpace = 'DCI-P3') {
const tech = this.displayTechnologies[displayTech];
const target = this.colorSpaces[targetColorSpace];
if (!tech || !target) {
throw new Error('Unknown display technology or color space');
}
let coverage;
switch (targetColorSpace) {
case 'sRGB':
coverage = tech.typical_sRGB;
break;
case 'DCI-P3':
case 'Display P3':
coverage = tech.typical_P3;
break;
case 'Rec.2020':
coverage = tech.typical_rec2020;
break;
default:
coverage = tech.typical_sRGB;
}
return {
displayTechnology: displayTech,
targetColorSpace,
coverage: coverage,
capability: this.assessCapability(coverage),
suitability: this.assessSuitability(coverage, targetColorSpace),
recommendations: this.generateDisplayRecommendations(displayTech, coverage, targetColorSpace)
};
}
assessCapability(coverage) {
if (coverage >= 98) return 'Excellent';
if (coverage >= 90) return 'Very Good';
if (coverage >= 80) return 'Good';
if (coverage >= 70) return 'Fair';
return 'Poor';
}
assessSuitability(coverage, colorSpace) {
const thresholds = {
'sRGB': { professional: 98, acceptable: 95 },
'DCI-P3': { professional: 95, acceptable: 85 },
'Display P3': { professional: 95, acceptable: 85 },
'Rec.2020': { professional: 90, acceptable: 75 }
};
const threshold = thresholds[colorSpace] || thresholds['sRGB'];
if (coverage >= threshold.professional) {
return 'Professional grade';
} else if (coverage >= threshold.acceptable) {
return 'Consumer acceptable';
} else {
return 'Limited capability';
}
}
generateDisplayRecommendations(displayTech, coverage, colorSpace) {
const recommendations = [];
if (coverage < 90) {
recommendations.push('Consider upgrading to a wide color gamut display');
}
if (colorSpace === 'Rec.2020' && coverage < 80) {
recommendations.push('Current technology cannot fully support Rec.2020');
recommendations.push('Consider DCI-P3 as intermediate target');
}
if (displayTech === 'Standard LCD') {
recommendations.push('Upgrade to quantum dot or OLED for better color reproduction');
}
return recommendations;
}
// Color space conversion with gamut mapping
convertWithGamutMapping(color, sourceSpace, targetSpace, mappingMethod = 'perceptual') {
// Convert color to XYZ intermediate space
const xyz = this.colorToXYZ(color, sourceSpace);
// Check if color is within target gamut
const targetColor = this.xyzToColor(xyz, targetSpace);
const inGamut = this.isInGamut(targetColor, targetSpace);
if (inGamut) {
return {
color: targetColor,
mapped: false,
method: 'direct conversion'
};
}
// Apply gamut mapping
const mappedColor = this.applyGamutMapping(xyz, targetSpace, mappingMethod);
return {
color: mappedColor,
mapped: true,
method: mappingMethod,
originalOutOfGamut: true
};
}
applyGamutMapping(xyz, targetSpace, method) {
switch (method) {
case 'clipping':
return this.clippingGamutMapping(xyz, targetSpace);
case 'perceptual':
return this.perceptualGamutMapping(xyz, targetSpace);
case 'relative':
return this.relativeGamutMapping(xyz, targetSpace);
case 'saturation':
return this.saturationGamutMapping(xyz, targetSpace);
default:
return this.perceptualGamutMapping(xyz, targetSpace);
}
}
clippingGamutMapping(xyz, targetSpace) {
// Simple clipping to gamut boundaries
const color = this.xyzToColor(xyz, targetSpace);
return {
r: Math.max(0, Math.min(255, color.r)),
g: Math.max(0, Math.min(255, color.g)),
b: Math.max(0, Math.min(255, color.b))
};
}
perceptualGamutMapping(xyz, targetSpace) {
// Perceptual mapping preserves overall appearance
// Simplified implementation - real algorithms are much more complex
const lab = this.xyzToLab(xyz, this.getWhitePointXYZ('D65'));
// Reduce chroma while preserving hue and lightness
const chroma = Math.sqrt(lab.a * lab.a + lab.b * lab.b);
const maxChroma = this.getMaxChromaForLightness(lab.L, targetSpace);
if (chroma > maxChroma) {
const factor = maxChroma / chroma;
lab.a *= factor;
lab.b *= factor;
}
const mappedXYZ = this.labToXYZ(lab, this.getWhitePointXYZ('D65'));
return this.xyzToColor(mappedXYZ, targetSpace);
}
relativeGamutMapping(xyz, targetSpace) {
// Relative colorimetric mapping
// Clips out-of-gamut colors to gamut boundary
return this.clippingGamutMapping(xyz, targetSpace);
}
saturationGamutMapping(xyz, targetSpace) {
// Saturation mapping preserves saturation over hue accuracy
const lab = this.xyzToLab(xyz, this.getWhitePointXYZ('D65'));
// Adjust lightness to maximize chroma
const targetL = this.getOptimalLightnessForChroma(lab.a, lab.b, targetSpace);
lab.L = targetL;
const mappedXYZ = this.labToXYZ(lab, this.getWhitePointXYZ('D65'));
return this.xyzToColor(mappedXYZ, targetSpace);
}
// Utility methods
chromaticityToXYZ(x, y, Y = 100) {
if (y === 0) return { X: 0, Y: 0, Z: 0 };
return {
X: (x * Y) / y,
Y: Y,
Z: ((1 - x - y) * Y) / y
};
}
getWhitePointXYZ(whitePoint) {
const whitePoints = {
'D65': { X: 95.047, Y: 100.000, Z: 108.883 },
'D50': { X: 96.422, Y: 100.000, Z: 82.521 },
'DCI': { X: 89.740, Y: 100.000, Z: 91.166 }
};
return whitePoints[whitePoint] || whitePoints['D65'];
}
xyzToLab(xyz, whitePoint) {
const xn = xyz.X / whitePoint.X;
const yn = xyz.Y / whitePoint.Y;
const zn = xyz.Z / whitePoint.Z;
const fx = this.labFunction(xn);
const fy = this.labFunction(yn);
const fz = this.labFunction(zn);
return {
L: Math.max(0, Math.min(100, 116 * fy - 16)),
a: Math.max(-128, Math.min(127, 500 * (fx - fy))),
b: Math.max(-128, Math.min(127, 200 * (fy - fz)))
};
}
labToXYZ(lab, whitePoint) {
const fy = (lab.L + 16) / 116;
const fx = lab.a / 500 + fy;
const fz = fy - lab.b / 200;
const xn = this.invLabFunction(fx);
const yn = this.invLabFunction(fy);
const zn = this.invLabFunction(fz);
return {
X: xn * whitePoint.X,
Y: yn * whitePoint.Y,
Z: zn * whitePoint.Z
};
}
labFunction(t) {
const delta = 6 / 29;
const deltaCubed = delta * delta * delta;
if (t > deltaCubed) {
return Math.pow(t, 1/3);
} else {
return (t / (3 * delta * delta)) + (4 / 29);
}
}
invLabFunction(t) {
const delta = 6 / 29;
if (t > delta) {
return Math.pow(t, 3);
} else {
return 3 * delta * delta * (t - 4/29);
}
}
colorToXYZ(color, colorSpace) {
// Simplified conversion - would need full implementation for each color space
return { X: 50, Y: 50, Z: 50 }; // Placeholder
}
xyzToColor(xyz, colorSpace) {
// Simplified conversion - would need full implementation for each color space
return { r: 128, g: 128, b: 128 }; // Placeholder
}
isInGamut(color, colorSpace) {
// Check if RGB values are within valid range
return color.r >= 0 && color.r <= 255 &&
color.g >= 0 && color.g <= 255 &&
color.b >= 0 && color.b <= 255;
}
getMaxChromaForLightness(L, colorSpace) {
// Simplified - would need actual gamut boundary calculation
return 50 - Math.abs(L - 50); // Placeholder
}
getOptimalLightnessForChroma(a, b, colorSpace) {
// Simplified - would need actual optimization
return 50; // Placeholder
}
}Explore these comprehensive pillar articles related to Wide Color Gamut
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.
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.
Comprehensive guide to triadic color schemes - three colors evenly spaced around the color wheel that create balanced, vibrant, and dynamic visual compositions with mathematical precision and artistic appeal.
Discover more about Wide Color Gamut and related color theory concepts
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.
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.
Discover more color terminology and concepts in our comprehensive glossary.
Browse Full Glossary