Color¶
Warning
It’s not wise to use strings taken from NWN scripts. There are are number of text encoding issues that will cause undesirable results.
Functions¶
-
Encode(r, g, b)¶ Encodes RGB values.
Parameters: - r (int) – Red
- g (int) – Green
- b (int) – Blue
-
EncodeHex(hex)¶ Encodes a hex color string.
Parameters: - hex (string) – Same format as HTML: “#000000”
local C = require 'solstice.color'
assert(C.EncodeHex('#FF0000') == C.Enocde(255, 0, 0))
Constants¶
-
BLUE¶ RGB(102, 204, 254)
-
DARK_BLUE¶ RGB(32, 102, 254)
-
GRAY¶ RGB(153, 153, 153)
-
GREEN¶ RGB(32, 254, 32)
-
LIGHT_BLUE¶ RGB(153, 254, 254)
-
LIGHT_GRAY¶ RGB(176, 176, 176)
-
LIGHT_ORANGE¶ RGB(254, 153, 32)
-
LIGHT_PURPLE¶ RGB(204, 153, 204)
-
ORANGE¶ RGB(254, 102, 32)
-
PURPLE¶ RGB(204, 119, 254)
-
RED¶ RGB(254, 32, 32)
-
WHITE¶ RGB(254, 254, 254)
-
YELLOW¶ RGB(254, 254, 32)
-
END¶ Colored text terminator.