### Function

# Babl space_from_chromaticities

#### Declaration [src]

    const Babl*
    babl_space_from_chromaticities (
      const char* name,
      double wx,
      double wy,
      double rx,
      double ry,
      double gx,
      double gy,
      double bx,
      double by,
      const Babl* trc_red,
      const Babl* trc_green,
      const Babl* trc_blue,
      BablSpaceFlags flags
    )

#### Description [src]

Creates a new babl-space/ RGB matrix color space definition with the specified CIE xy(Y) values for white point: wx, wy and primary chromaticities: rx,ry,gx,gy,bx,by and TRCs to be used. After registering a new babl-space it can be used with `babl_space()` passing its name;

Internally this does the math to derive the RGBXYZ matrix as used in an ICC profile.

#### Parameters

`name`

  Type: `const char*`

  The name for the color space.

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`wx`

  Type: `double`

  The X-coordinate of the color space’s white point.

`wy`

  Type: `double`

  The Y-coordinate of the color space’s white point.

`rx`

  Type: `double`

  The X-coordinate of the red primary.

`ry`

  Type: `double`

  The Y-coordinate of the red primary.

`gx`

  Type: `double`

  The X-coordinate of the green primary.

`gy`

  Type: `double`

  The Y-coordinate of the green primary.

`bx`

  Type: `double`

  The X-coordinate of the blue primary.

`by`

  Type: `double`

  The Y-coordinate of the blue primary.

`trc_red`

  Type: `Babl`

  The red component of the TRC.

  The data is owned by the caller of the function.

`trc_green`

  Type: `Babl`

  The green component of the TRC (can be `NULL` if it’s the same as `trc_red`).

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`trc_blue`

  Type: `Babl`

  The blue component of the TRC (can be `NULL` if it’s the same as `trc_red`).

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`flags`

  Type: `BablSpaceFlags`

  The `BablSpaceFlags`.

#### Return value

Type: `Babl`

No description available.

The data is owned by the called function.