cam_color()

Retrieves the color of a specific pixel from the internally stored camera capture.

Syntax

cam_color(x, y)

Parameters

Parameter Type Description Comment
x Number X-coordinate of the pixel
y Number Y-coordinate of the pixel

Return Value

Examples

Get color at pixel (100, 50)

color = cam_color(100, 50);
print("Color value: ", color);
name = rgb2name(color);

See also

cam_grab
cam_color
cam_rect

rgb_to_hue
rgb_to_saturation
rgb_to_lightness
rgb_to_name