Module ncine.color

The table containing color related functions

Functions

ncine.color.create (r, g, b, a) Creates a color table from its components
ncine.color.add (color0, color1) Adds two colors together, component-wise, clamping to 1.0
ncine.color.sub (color0, color1) Subtracts the second color from the first one, component-wise, clamping to 0.0
ncine.color.mul (color0, color1) Multiplies two colors together, component-wise, clamping to 1.0
ncine.color.mul (color0, scalar) Multiplies the color components by the scalar, clamping to 1.0

Tables

ncine.colors.BLACK Black color values
ncine.colors.WHITE White color values
ncine.colors.RED Red color values
ncine.colors.GREEN Green color values
ncine.colors.BLUE Blue color values
ncine.colors.YELLOW Yellow color values
ncine.colors.MAGENTA Magenta color values
ncine.colors.CYAN Cyan color values
ncine.color A RGBA color


Functions

ncine.color.create (r, g, b, a)
Creates a color table from its components

Parameters:

  • r number The red component
  • g number The green component
  • b number The blue component
  • a number The alpha component

Returns:

    ncine.color
ncine.color.add (color0, color1)
Adds two colors together, component-wise, clamping to 1.0

Parameters:

Returns:

    ncine.color
ncine.color.sub (color0, color1)
Subtracts the second color from the first one, component-wise, clamping to 0.0

Parameters:

Returns:

    ncine.color
ncine.color.mul (color0, color1)
Multiplies two colors together, component-wise, clamping to 1.0

Parameters:

Returns:

    ncine.color
ncine.color.mul (color0, scalar)
Multiplies the color components by the scalar, clamping to 1.0

Parameters:

Returns:

    ncine.color

Tables

ncine.colors.BLACK
Black color values

Fields:

  • r
  • g
  • b
  • a
ncine.colors.WHITE
White color values

Fields:

  • r
  • g
  • b
  • a
ncine.colors.RED
Red color values

Fields:

  • r
  • g
  • b
  • a
ncine.colors.GREEN
Green color values

Fields:

  • r
  • g
  • b
  • a
ncine.colors.BLUE
Blue color values

Fields:

  • r
  • g
  • b
  • a
ncine.colors.YELLOW
Yellow color values

Fields:

  • r
  • g
  • b
  • a
ncine.colors.MAGENTA
Magenta color values

Fields:

  • r
  • g
  • b
  • a
ncine.colors.CYAN
Cyan color values

Fields:

  • r
  • g
  • b
  • a
ncine.color
A RGBA color

Fields:

  • r number The red component
  • g number The green component
  • b number The blue component
  • a number The alpha component
generated by LDoc 1.5.0 Last updated 2024-12-18 15:08:56