Skip to content
Image & Canvas mapPixel

$mapPixel — Returns the pixel mapped to the closest color of the color map, as [r, g, b, a] (nothing is changed in place). (alias of $NQmapPixel)

Returns the pixel mapped to the closest color of the color map, as [r, g, b, a] (nothing is changed in place). (alias of $NQmapPixel)

Syntax

$mapPixel[name;r;g;b;a]

Parameters

  • name (String, required) — Instance name
  • r (Number, required) — Red
  • g (Number, required) — Green
  • b (Number, required) — Blue
  • a (Number, required) — Alpha

Return Value

  • Json.

Usage

$mapPixel[name;r;g;b;a] → result

Example

$sendMessage[$mapPixel[name;r;g;b;a]]

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.