---
id: fast-colors.xyztorgb
title: xyzToRGB() function
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-colors](./fast-colors.md) &gt; [xyzToRGB](./fast-colors.xyztorgb.md)

## xyzToRGB() function

Converts a [ColorXYZ](./fast-colors.colorxyz.md) to a [ColorRGBA64](./fast-colors.colorrgba64.md)

<b>Signature:</b>

```typescript
export declare function xyzToRGB(xyz: ColorXYZ, alpha?: number): ColorRGBA64;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  xyz | [ColorXYZ](./fast-colors.colorxyz.md) | the xyz color to convert |
|  alpha | number | the alpha value |

<b>Returns:</b>

[ColorRGBA64](./fast-colors.colorrgba64.md)

## Remarks

Note that the xyz color space is significantly larger than sRGB. As such, this can return colors rgb values greater than 1 or less than 0
