Module libr35.utils.colors

A collection of useful functions that help convert colors between formats, and also provides canned colors.

Functions

hex_color_to_rgba (hex, alpha) Convert a hex color string to RGBA
rgba_255_to_rgba_1 (red, green, blue, alpha) Converts RGBA 0-255 to RGBA 0-1


Functions

hex_color_to_rgba (hex, alpha)
Convert a hex color string to RGBA TTS Scripting API Docs for "Color" https://api.tabletopsimulator.com/color/

Parameters:

  • hex string 6-character Hex Color; hashtag optional
  • alpha integer Alpha (from 0-1)

Returns:

    Color object

See also:

rgba_255_to_rgba_1 (red, green, blue, alpha)
Converts RGBA 0-255 to RGBA 0-1 TTS Scripting API Docs for "Color" https://api.tabletopsimulator.com/color/

Parameters:

  • red integer Red channel value (0-255)
  • green integer Red channel value (0-255)
  • blue integer Red channel value (0-255)
  • alpha integer Alpha (from 0-1)

Returns:

    Color object

See also:

generated by LDoc 1.4.6 Last updated 2020-10-17 20:06:43