---
title: "Color..::.FromAGrayScale Method "
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Color_FromAGrayScale_2_db855281.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.FromAGrayScale Method 
 
Returns [GrayScaleColor](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_GrayScaleColor.htm.md) class instance constructed from given luminosity and alpha channel values.
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Shared Function FromAGrayScale ( _alpha As Byte, _gray As Byte _
) As GrayScaleColor
```
 
```csharp
public static GrayScaleColor FromAGrayScale(byte alpha,byte gray
)
```
 
### Parameters
 
 - alpha
     - Type: [System.Byte](http://msdn2.microsoft.com/en-us/yyb1w04y)
Alpha channel value.

 - gray
     - Type: [System.Byte](http://msdn2.microsoft.com/en-us/yyb1w04y)
Luminosity channel value.
 
### Return Value
 [GrayScaleColor](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_GrayScaleColor.htm.md) class instance constructed from given channels.
 
## Remarks
 You can also use extended version of this method, i.e. [FromAGrayScale32(Int32, Int32)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Color_FromAGrayScale32_2_22dcb54d.htm.md). If you do not care about alpha channel, you can also use [FromGrayScale(Byte)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Color_FromGrayScale_1_846cbb0c.htm.md) method.
   
## 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)
