Knowledge Base

Get Color Block

The Get Color block returns the color value detected by a Color sensor.

In order to use the Get Color Block, the Color sensor's LED must first be enabled using the Enable Color LED block.

To use this block, simply add it to your program, select a Color sensor and select the desired type of color value that you want to return.

There are six color values that can be configured and returned:

Color Value Type Description
getAlpha Returns the amount of detected light.
getRed Returns an integer of the detected red values.
getGreen Returns an integer of the detected green values.
getBlue Returns an integer of the detected blue values.
getARGB Returns the detected hue.

Returns a number that represents the detected color, as follows: (source:

Was this article helpful?
0 out of 0 found this helpful


Please sign in to leave a comment.

Powered by Zendesk