---
title: "Bitmap.GetPixel Method "
canonical: https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Bitmap_GetPixel_2_22dcb54d.htm
product: "Graphics Mill"
---

# Bitmap.GetPixel Method 
 
Gets the color of the specified pixel in this [Bitmap](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Bitmap.htm.md).
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public Color GetPixel(int x,int y
)
```
 
### Parameters
 
 - x
     - Type: System.Int32
The x-coordinate of the pixel to retrieve.

 - y
     - Type: System.Int32
The y-coordinate of the pixel to retrieve.
 
### Return Value
A [Color](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Color.htm.md) that represents the color of the specified pixel. The actual type of the returned object depends on color space of the bitmap. E.g. if the bitmap is RGB, actual type will be [RgbColor](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_RgbColor.htm.md), etc.
 
## Remarks
  
This method was implemented for easy but slow access to pixels. It works ideally if you need to get one pixel value, for example, when you implement color picker.
 
## Examples
  
```csharp
bitmap.SetPixel(120, 100, RgbColor.Red);
var color = (RgbColor)(bitmap.GetPixel(100, 80));
```
   
## See Also

### Reference

- [Bitmap Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Bitmap.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill.htm.md)
