Class Color

An RGBA or RGB color.

Components are specified in bytes; all values are clamped to [0, 255].

Members

Color.r (int) red component
Color.g (int) green component
Color.b (int) blue component
Color.a (int) alpha component (255 is opaque, 0 is invisible)

Functions

Color.new (R, G, B)
Color.new (R, G, B, A)

Metamethods

Color:__tostring (color)


Members

Color.r
(int) red component
Color.g
(int) green component
Color.b
(int) blue component
Color.a
(int) alpha component (255 is opaque, 0 is invisible)

Functions

Methods
Color.new (R, G, B)

Parameters:

  • R int red component
  • G int green component
  • B int blue component

Returns:

    A Color object.
Color.new (R, G, B, A)

Parameters:

  • R int red component
  • G int green component
  • B int blue component
  • A int alpha component (255 is opaque, 0 is invisible)

Returns:

    A Color object.

Metamethods

Color:__tostring (color)

Parameters:

Returns:

    string A string showing the r, g, b, and a values of the color
generated by LDoc 1.4.6 Last updated 2021-08-15 23:07:28