Class Color

An RGBA or RGB color.

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

Members

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

Functions

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


Members

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

Functions

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.
__tostring(color)

Parameters:

  • color Color this color

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-30 18:45:10