---
title: "Color..::.ToArray Method "
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Color_ToArray.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# Color.ToArray Method 
 
Returns a byte array that contains all channels of the color (8 bits per channel).
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Function ToArray As Byte()
```
 
```csharp
public byte[] ToArray()
```
 
### Return Value
Array that contains channels of the color.
 
## Remarks
  
The order of channels is the same as byte order in numeric representation of the color. The last item always contains alpha channel. Therefore the order is a following (from first array item to last):
 
- **RGB**blue, green, red, alpha;
- **CMYK**black, yellow, magenta, cyan, alpha;
- **Grayscale**intensity level, alpha;

Also, you can use extended version of this method, i.e. [ToArray32()](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Color_ToArray32.htm.md).
   
## See Also

### Reference

- [Color Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Color.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
