# ReadPixel

Reads a pixel from the display currently associated with a GrafCon.

### Synopsis

`Color ReadPixel (Item bitmapItem,GrafCon *gc,Coord x, Coord y)`

### Description

This call reads a pixel from the display of the specified GrafCon. The x and y coordinates specify the offset into the pixmap of the GrafCon bitmap. The value of the pixel there is read and returned.

### Arguments

bitmapItem
  The item number of the bitmap.

gc
  Pointer to a GrafCon structure.

x
  Column of the pixel to be read.

y
  Row of the pixel to be read.

### Return Value

This call returns the pixel value at the specified location or an error code (a negative value) if an error occurs.

GRAFERR_COORDRANGE is returned if the specified location is outside the bounds of the specified bitmap.

### Implementation

Folio call implemented in Graphics folio V20.

### Associated Files

graphics.h, graphics.lib

### See Also

``GetPixelAddress`()`