Skip to content

$getPixelColors

Returns an array of pixels. (their colors)

Usage

$getPixelColors[canvas;x;y;width;height]

Parameters

FieldTypeDescriptionRequired
canvasStringName of the canvas to get the pixels from.True
xNumberThe X coordinate of the top-left corner of the rectangle from which the pixel colors will be extracted.True
yNumberThe Y coordinate of the top-left corner of the rectangle from which the pixel colors will be extracted.True
widthNumberThe width of the rectangle from which the pixel colors will be extracted.True
heightNumberThe height of the rectangle from which the pixel colors will be extracted.True

Example(s)

No examples for this function.

meow

Raw Info

{
"name": "$getPixelColors",
"description": "Returns an array of pixels. (their colors)",
"params": [
{
"name": "canvas",
"description": "Name of the canvas to get the pixels from.",
"type": "String",
"required": true
},
{
"name": "x",
"description": "The X coordinate of the top-left corner of the rectangle from which the pixel colors will be extracted.",
"type": "Number",
"required": true
},
{
"name": "y",
"description": "The Y coordinate of the top-left corner of the rectangle from which the pixel colors will be extracted.",
"type": "Number",
"required": true
},
{
"name": "width",
"description": "The width of the rectangle from which the pixel colors will be extracted.",
"type": "Number",
"required": true
},
{
"name": "height",
"description": "The height of the rectangle from which the pixel colors will be extracted.",
"type": "Number",
"required": true
}
],
"usage": "$getPixelColors[canvas;x;y;width;height]",
"category": "canvas",
"src": "https://github.com/devlordduck/aoi.canvas/tree/v2/src/functions/canvas/getPixelColors.ts",
"docs": "https://aoicanvas.vercel.app/functions/getpixelcolors"
}