Skip to content

niPackedColor⚓︎

An object that represents a RGB color with alpha channel support. Unlike other color values, this is compressed into 4 bytes. Values are not from 0 to 1, but from 0 to 255.

Properties⚓︎

a⚓︎

The alpha value of the color.

Returns:

  • result (integer)

alpha⚓︎

The alpha value of the color.

Returns:

  • result (integer)

b⚓︎

The blue value of the color.

Returns:

  • result (integer)

blue⚓︎

Alias for the blue value of the color.

Returns:

  • result (integer)

g⚓︎

The green value of the color.

Returns:

  • result (integer)

green⚓︎

Alias for the green value of the color.

Returns:

  • result (integer)

r⚓︎

The red value of the color.

Returns:

  • result (integer)

red⚓︎

Alias for the red value of the color.

Returns:

  • result (integer)

Functions⚓︎

new⚓︎

Creates a new niPackedColor object.

local color = niPackedColor.new(r, g, b, a)

Parameters:

  • r (integer): Default: 0. The red value for the color.
  • g (integer): Default: 0. The green value for the color.
  • b (integer): Default: 0. The blue value for the color.
  • a (integer): Default: 0. The alpha value for the color.

Returns: