pixel Color

Get the color of the pixel at the location with this number.

light.pixelColor(0)

Parameters

  • pixelOffset: the position on the ring of the pixel whose color you want to know.

Returns

  • a number which is the RGB value for the current color of the pixel light.

Example

Get the color for the pixel at position 3 and set the pixel at position 4 to the same color.

light.setPixelColor(4, light.pixelColor(3))

See Also

||set pixel color||, ||rgb||

circuit-playground