Module jls.util.color

Provide color functions.

Functions

hsvToRgb (h, s, v) Transforms a color expressed with hue, saturation and value to red, green and blue.
rgbToHsv (r, g, b) Transforms a color expressed with red, green and blue to hue, saturation and value.


Functions

hsvToRgb (h, s, v)
Transforms a color expressed with hue, saturation and value to red, green and blue.

Parameters:

  • h number the hue value from 0 to 1.
  • s number the saturation value from 0 to 1.
  • v number the value from 0 to 1.

Returns:

  1. number the red component value from 0 to 1.
  2. number the green component value from 0 to 1.
  3. number the blue component value from 0 to 1.
rgbToHsv (r, g, b)
Transforms a color expressed with red, green and blue to hue, saturation and value.

Parameters:

  • r number the red component value from 0 to 1.
  • g number the green component value from 0 to 1.
  • b number the blue component value from 0 to 1.

Returns:

  1. number the hue value from 0 to 1.
  2. number the saturation value from 0 to 1.
  3. number the value from 0 to 1.
generated by LDoc 1.4.6 Last updated 2022-01-22 16:32:56