---
id: fast-colors.colorxyz.toobject
title: ColorXYZ.toObject() method
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-colors](./fast-colors.md) &gt; [ColorXYZ](./fast-colors.colorxyz.md) &gt; [toObject](./fast-colors.colorxyz.toobject.md)

## ColorXYZ.toObject() method

Returns the [ColorXYZ](./fast-colors.colorxyz.md) formatted as an object.

<b>Signature:</b>

```typescript
toObject(): {
        x: number;
        y: number;
        z: number;
    };
```
<b>Returns:</b>

{ x: number; y: number; z: number; }
