A comprehensive guide to color gamut - the complete range of colors that can be reproduced by a device, color space, or medium, including sRGB, Adobe RGB, P3, and wide color gamut technologies.
Color gamut refers to the complete range or subset of colors that can be accurately represented, reproduced, or displayed by a particular device, color space, or medium. Understanding color gamut is crucial for color management, ensuring consistent color reproduction across different devices and media.
A color gamut represents the boundary of all possible colors that can be produced within a specific color system. It's typically visualized as a shape plotted on a chromaticity diagram, such as the CIE 1931 color space diagram, where the area enclosed by the shape represents all reproducible colors.
Color gamuts are commonly represented as:
The most widely used color space for web content and consumer displays:
| Characteristic | Value | Description |
|---|---|---|
| Coverage | ~35% of visible spectrum | Baseline for web and digital content |
| White Point | D65 (6500K) | Standard daylight illuminant |
| Gamma | 2.2 (approximate) | Standard gamma curve |
| Primaries | ITU-R BT.709 | HDTV standard primaries |
Professional color space with wider gamut than sRGB:
| Characteristic | Value | Description |
|---|---|---|
| Coverage | ~50% of visible spectrum | Better for print and professional work |
| Green Primary | More saturated than sRGB | Better reproduction of green colors |
| Use Cases | Photography, print, professional | When color accuracy is critical |
Modern wide color gamut used in Apple devices and cinema:
| Characteristic | Value | Description |
|---|---|---|
| Coverage | ~45% of visible spectrum | 25% larger than sRGB |
| Red Primary | More saturated than sRGB | Better red reproduction |
| Applications | Modern displays, HDR content | Cinema and consumer displays |
When colors exist in one gamut but not another, gamut mapping techniques are used:
// Gamut mapping strategies
const gamutMappingMethods = {
// Clipping - map out-of-gamut colors to gamut boundary
clipping: (color, targetGamut) => {
return {
r: Math.min(Math.max(color.r, targetGamut.min.r), targetGamut.max.r),
g: Math.min(Math.max(color.g, targetGamut.min.g), targetGamut.max.g),
b: Math.min(Math.max(color.b, targetGamut.min.b), targetGamut.max.b)
};
},
// Compression - scale entire gamut to fit target
compression: (color, sourceGamut, targetGamut) => {
const scaleR = targetGamut.range.r / sourceGamut.range.r;
const scaleG = targetGamut.range.g / sourceGamut.range.g;
const scaleB = targetGamut.range.b / sourceGamut.range.b;
return {
r: color.r * scaleR,
g: color.g * scaleG,
b: color.b * scaleB
};
},
// Perceptual - maintain visual relationships
perceptual: (color, intent) => {
// Complex algorithm preserving visual appearance
// Implementation would use ICC profiles and color management
return transformWithIntent(color, intent);
}
};
// Gamut boundary detection
function isInGamut(color, gamut) {
const lab = rgbToLab(color);
return (
lab.l >= gamut.bounds.l.min && lab.l <= gamut.bounds.l.max &&
lab.a >= gamut.bounds.a.min && lab.a <= gamut.bounds.a.max &&
lab.b >= gamut.bounds.b.min && lab.b <= gamut.bounds.b.max
);
}
// Gamut volume calculation
function calculateGamutVolume(gamut) {
// Monte Carlo method for complex gamut shapes
let insideCount = 0;
const samples = 1000000;
for (let i = 0; i < samples; i++) {
const randomColor = {
l: Math.random() * 100,
a: (Math.random() - 0.5) * 256,
b: (Math.random() - 0.5) * 256
};
if (isInGamut(labToRgb(randomColor), gamut)) {
insideCount++;
}
}
return (insideCount / samples) * (100 * 256 * 256);
}Modern display technologies enabling wider color gamuts:
| Technology | Gamut Coverage | Advantages | Applications |
|---|---|---|---|
| Quantum Dot | Up to 90% DCI-P3 | Pure, saturated colors | Premium TVs, monitors |
| OLED | 100% DCI-P3, 75% Rec.2020 | Perfect blacks, high contrast | Smartphones, TVs |
| Mini-LED | 95%+ DCI-P3 | High brightness, local dimming | Professional monitors |
| Laser Displays | 90%+ Rec.2020 | Extremely wide gamut | Cinema, specialized displays |
High Dynamic Range often includes wider color gamuts:
/* CSS for wide color gamut support */
@media (color-gamut: p3) {
.wide-color-element {
/* Use P3 colors for capable displays */
background-color: color(display-p3 1 0.5 0.2);
}
}
@media (color-gamut: srgb) {
.wide-color-element {
/* Fallback to sRGB */
background-color: rgb(255, 128, 51);
}
}
/* JavaScript gamut detection */
function detectColorGamut() {
if (window.matchMedia('(color-gamut: p3)').matches) {
return 'p3';
} else if (window.matchMedia('(color-gamut: srgb)').matches) {
return 'srgb';
} else {
return 'rec2020'; // Future-proofing
}
}
// Adaptive color selection based on gamut
function getOptimalColor(baseColor, gamut) {
switch (gamut) {
case 'p3':
return `color(display-p3 ${baseColor.p3.r} ${baseColor.p3.g} ${baseColor.p3.b})`;
case 'srgb':
default:
return `rgb(${baseColor.srgb.r}, ${baseColor.srgb.g}, ${baseColor.srgb.b})`;
}
}Color gamut considerations for different media:
| Medium | Typical Gamut | Considerations |
|---|---|---|
| Inkjet Printing | Varies by paper/ink | Soft proofing essential |
| Offset Printing | SWOP, GRACoL standards | CMYK limitations |
| Digital Photography | Adobe RGB preferred | RAW processing workflow |
| Web Publishing | sRGB standard | Widest compatibility |
Professional tools for gamut analysis:
// Display calibration workflow
class DisplayCalibration {
constructor(display) {
this.display = display;
this.targetGamut = 'sRGB'; // or 'Adobe RGB', 'P3'
this.measurements = [];
}
async calibrateDisplay() {
// 1. Warm up display
await this.warmUpDisplay(30); // 30 minutes
// 2. Measure current gamut
const currentGamut = await this.measureGamut();
// 3. Calculate corrections
const corrections = this.calculateCorrections(currentGamut, this.targetGamut);
// 4. Apply corrections
await this.applyCorrections(corrections);
// 5. Verify results
const finalGamut = await this.measureGamut();
return this.validateCalibration(finalGamut);
}
async measureGamut() {
const testPatches = this.generateTestPatches();
const measurements = [];
for (const patch of testPatches) {
const measurement = await this.measurePatch(patch);
measurements.push(measurement);
}
return this.calculateGamutFromMeasurements(measurements);
}
generateTestPatches() {
// Generate color patches for gamut boundary measurement
const patches = [];
// Primary and secondary colors
patches.push(
{ r: 255, g: 0, b: 0 }, // Red
{ r: 0, g: 255, b: 0 }, // Green
{ r: 0, g: 0, b: 255 }, // Blue
{ r: 255, g: 255, b: 0 }, // Yellow
{ r: 255, g: 0, b: 255 }, // Magenta
{ r: 0, g: 255, b: 255 } // Cyan
);
// Additional gamut boundary points
for (let hue = 0; hue < 360; hue += 15) {
patches.push(this.hslToRgb(hue, 100, 50));
}
return patches;
}
}Explore these comprehensive pillar articles related to Color Gamut
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.
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 about 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.
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.
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 color terminology and concepts in our comprehensive glossary.
Browse Full Glossary