---
title: "Convert CIEXYZ to CIELAB"
---

### Description

`X`, `Y`, and `Z` specify the values in the three coordinates of the
CIELAB color space,
`XN`, `YN`, and `ZN` allow to specify additional CIE chromaticities to
specify a specific white point.

### Usage

<pre><code class='language-python'>colorlib.XYZ_to_LAB(X, Y, Z, XN=None, YN=None,<br/>                    ZN=None)</code></pre>

### Arguments

<dl class="pyp-list param-list">
  <dt style = "white-space: nowrap; font-family: monospace; vertical-align: top">
   <code id="colorspace.colorlib.colorlib.XYZ_to_LAB:X">X</code><code class="argument-class">numpy.ndarray</code>
  </dt>
 <dd>Values for the `X` dimension.</dd>
  <dt style = "white-space: nowrap; font-family: monospace; vertical-align: top">
   <code id="colorspace.colorlib.colorlib.XYZ_to_LAB:Y">Y</code><code class="argument-class">numpy.ndarray</code>
  </dt>
 <dd>Values for the `Y` dimension.</dd>
  <dt style = "white-space: nowrap; font-family: monospace; vertical-align: top">
   <code id="colorspace.colorlib.colorlib.XYZ_to_LAB:Z">Z</code><code class="argument-class">numpy.ndarray</code>
  </dt>
 <dd>Values for the `Z` dimension.</dd>
  <dt style = "white-space: nowrap; font-family: monospace; vertical-align: top">
   <code id="colorspace.colorlib.colorlib.XYZ_to_LAB:XN">XN</code><code class="argument-class">None, numpy.ndarray</code>
  </dt>
 <dd>Chromaticity of the white point. If of
length `1`, the white point specification will be recycled if needed.
When not specified (all `None`) a default white point is used.</dd>
  <dt style = "white-space: nowrap; font-family: monospace; vertical-align: top">
   <code id="colorspace.colorlib.colorlib.XYZ_to_LAB:YN">YN</code>
  </dt>
 <dd>See `XN`.</dd>
  <dt style = "white-space: nowrap; font-family: monospace; vertical-align: top">
   <code id="colorspace.colorlib.colorlib.XYZ_to_LAB:ZN">ZN</code>
  </dt>
 <dd>See `XN`.</dd>
</dl>

### Return

<code>list</code>: Returns corresponding coordinates of CIE chromaticities as
a list of `numpy.ndarray`s of the same length as the inputs (`[L, A, B]`).
