[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Graphics' (#lcl)

# TCanvas.GetColor

Gets the Color for the pixel at the given coordinates as a TFPColor value.

## Declaration

Source position: graphics.pp line 1032

`protected function TCanvas.GetColor(`
`x: Integer;`
`y: Integer`
`):TFPColor; override;`

## Arguments

`x` |  | Horizontal position for the pixel.
`y` |  | Vertical position for the pixel.

## Function result

TFPColor value for the pixel at the specified position.

## Description

Uses the indexed Pixels property to retrieve the color information for the pixel at the coordinates in x and y. Calls TColorToFPColor to convert the TColor value to the TFPColor type used in the return value.

## See also

TCanvas.Pixels |  | The color of the Pixels located at the specified position.
TColorToFPColor |  | TColorToFPColor - converts a color of type TColor to one specified as a FPColor.