image.img:get_color_rgb
Declaration
lua
img:get_color_rgb(x, y)
Description
Get pixel R,G,B from image.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
x | number | Required | — | X |
y | number | Required | — | Y |
Return Values
| Type | Description |
|---|---|
| integer | R |
| integer | G |
| integer | B |
Example
lua
local r,g,b = img:get_color_rgb(10, 20)