anki_vector.color

Colors to be used with a light or Vector’s screen.

Classes

Color([int_color, rgb, name])

A Color to be used with a Light or Vector’s screen.

class anki_vector.color.Color(int_color=None, rgb=None, name=None)

A Color to be used with a Light or Vector’s screen.

Either int_color or rgb may be used to specify the actual color. Any alpha components (from int_color) are ignored - all colors are fully opaque.

Parameters
  • int_color (Optional[int]) – A 32 bit value holding the binary RGBA value (where A is ignored and forced to be fully opaque).

  • rgb (Optional[tuple]) – A tuple holding the integer values from 0-255 for (reg, green, blue)

  • name (Optional[str]) – A name to assign to this color.

int_color

The encoded integer value of the color.

Return type

int

rgb565_bytepair

Two bytes representing an int16 color with rgb565 encoding.

This format reflects the robot’s Screen color range, and performing this conversion will reduce network traffic when sending Screen data.

Type

bytes[]

anki_vector.color.blue = <anki_vector.color.Color object>

Blue color instance.

Type

Color

anki_vector.color.cyan = <anki_vector.color.Color object>

Cyan color instance.

Type

Color

anki_vector.color.green = <anki_vector.color.Color object>

Green color instance.

Type

Color

anki_vector.color.magenta = <anki_vector.color.Color object>

Magenta color instance.

Type

Color

anki_vector.color.off = <anki_vector.color.Color object>

Instance representing no color (i.e., lights off).

Type

Color

anki_vector.color.red = <anki_vector.color.Color object>

Red color instance.

Type

Color

anki_vector.color.white = <anki_vector.color.Color object>

White color instance.

Type

Color

anki_vector.color.yellow = <anki_vector.color.Color object>

Yellow color instance.

Type

Color