A CIE 1931 color space calculator converts measured red, green, and blue tristimulus values (XYZ) into chromaticity coordinates x and y, which describe a color’s hue and saturation independently of its overall brightness. Enter X, Y, and Z; the calculator returns x, y, and the corresponding z coordinate, as well as the CIE 1931 xy chromaticity information.
Formula
The CIE 1931 chromaticity coordinates are obtained by normalizing the XYZ tristimulus values by their sum:
- x = X / (X + Y + Z)
- y = Y / (X + Y + Z)
- z = Z / (X + Y + Z)
X, Y, and Z are tristimulus values: linear quantities representing a color’s relationship to the CIE standard observer’s color-matching functions. Their units depend on how the measurement or calculation is defined; they must use the same scale. The lowercase x, y, and z are dimensionless chromaticity coordinates. They sum to 1, apart from rounding. The calculator’s first result is x; its second is y, the pair commonly plotted on the CIE 1931 xy chromaticity diagram.
Worked Example
Using the calculator’s defaults, X = 0.4124, Y = 0.2126, and Z = 0.0193:
- Find the total: X + Y + Z = 0.4124 + 0.2126 + 0.0193 = 0.6443.
- Calculate x: 0.4124 / 0.6443 = 0.6398, rounded to four decimal places.
- Calculate y: 0.2126 / 0.6443 = 0.3300, rounded to four decimal places.
- Calculate z: 0.0193 / 0.6443 = 0.0300, rounded to four decimal places.
The result is approximately (x, y) = (0.6398, 0.3300), with z = 0.0300. The rounded coordinates add to 0.9998; before rounding, they add to 1.
What CIE 1931 Describes
The International Commission on Illumination (CIE) introduced the XYZ color-matching system in 1931 as a way to represent colors using a defined standard observer. XYZ is a device-independent color space: its values are not directly tied to the red, green, and blue primaries of a particular screen. The CIE 1931 xy diagram is a two-dimensional representation derived from XYZ, not a complete description of brightness.
That distinction is important. The Y tristimulus value carries information related to luminance, while x and y describe chromaticity. If XYZ is multiplied by the same positive factor, x and y do not change. For example, XYZ values (0.4124, 0.2126, 0.0193) and (41.24, 21.26, 1.93) produce the same chromaticity. They do not represent the same absolute luminance unless the measurement conventions also make them equivalent.
How to Use the Calculator
- Enter X, Y, and Z from the same measurement, calculation, or color-conversion workflow.
- Keep all three values on the same scale and use linear tristimulus values, not gamma-encoded display RGB values.
- Read x and y as the coordinates to plot on a CIE 1931 xy diagram; z is the remaining normalized coordinate.
- Check that the inputs are nonnegative and that X + Y + Z is greater than zero. An all-zero triplet has no defined chromaticity because the formula would divide by zero.
The calculator does not convert arbitrary RGB numbers to XYZ by itself. RGB-to-XYZ conversion requires the RGB color space’s primaries, white point, transfer function, and applicable conversion matrix. Once correctly converted to XYZ, the values can be entered here.
Reading the xy Diagram
Each valid chromaticity is a point on the xy diagram. The diagram’s curved outer boundary represents monochromatic spectral colors; the straight edge joining the ends of that curve is associated with mixtures of extreme violet wavelengths. A point inside the boundary represents a chromaticity achievable by mixing colors on the boundary, subject to the diagram’s colorimetric interpretation.
The diagram is useful for comparing chromaticities, describing a light source, or showing the gamut of a display or other color-producing system. A gamut is often drawn as a polygon connecting the chromaticities of its primaries. The polygon helps show which chromaticities that system can reproduce, but it does not show how bright those colors are, how they look on a particular display, or how accurately a device reproduces them.
Common Mistakes and Limits
- Using gamma-encoded RGB as XYZ: Values such as sRGB code values are not linear tristimulus values. Apply the appropriate decoding and RGB-to-XYZ transformation first.
- Mixing scales or measurement conditions: X, Y, and Z must refer to the same sample and observer/measurement setup. A common scale factor cancels; inconsistent scaling does not.
- Treating x and y as a full color specification: They omit luminance and do not, by themselves, specify viewing conditions or a device’s appearance.
- Rounding too early: Keep full precision through the normalization and round only for display. Rounded coordinates may not sum to exactly 1.
- Expecting the diagram to be perceptually uniform: Equal distances on the xy diagram do not correspond to equal perceived color differences. For tasks involving perceptual differences, a suitable uniform color space may be more appropriate.
The standard formulas are purely mathematical, but meaningful coordinates depend on reliable XYZ inputs. The calculator cannot identify a sample’s color from a name, image, or RGB triplet without the additional color-space and measurement information needed for conversion.
Frequently Asked Questions
What does a CIE 1931 color space calculator calculate?
It normalizes X, Y, and Z into x, y, and z chromaticity coordinates. The x and y results locate the chromaticity on the CIE 1931 xy diagram.
How do I calculate CIE 1931 x and y?
Add X, Y, and Z. Divide X by that sum to get x, and divide Y by the same sum to get y. The z coordinate is Z divided by the sum.
Do CIE x, y coordinates include brightness?
No. Chromaticity coordinates describe color independently of overall intensity. Y in the original XYZ triplet carries luminance-related information, under the relevant measurement convention.
Can I enter RGB values into this calculator?
Not directly. Convert the RGB values to linear XYZ using the correct RGB color-space definition and transformation first; then enter X, Y, and Z.
Why do my x, y, and z values not add to exactly 1?
They should sum to 1 before rounding. A small difference in displayed results is normally caused by rounding the coordinates to a limited number of decimal places.
Related
Formula used
in x | X tristimulus value | - | 0.4124 | 0 in y | Y tristimulus value | - | 0.2126 | 0 in z | Z tristimulus value | - | 0.0193 | 0 out cx | CIE x chromaticity | - | x / (x + y + z) | 4 out cy | CIE y chromaticity | - | y / (x + y + z) | 4 out cz | CIE z chromaticity | - | z / (x + y + z) | 4
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Resolution Bandwidth Calculator: RBW Explained1,000.00 Hz
- RC Parallel Impedance Calculator for Speakers1.56 ohm
- RF Frequency Range Calculator: Find the Band20.000 MHz
- Equivalent Impedance: How to Calculate It30.00 ohm
- Capacitor Calculation: Find Capacitance and Charge
- Gaussian Beam Focusing Calculator With Temperature16.93 um