Background for Skyrim SE

DbColorFunctions


Inheritance Tree

No indexed scripts extend this script.

Properties
Events
Functions
int[]functionGetRandomRGB()Global

get random rgb color in int array.

int[]functionGetRandomHSL()Global

get a random hsl color in int array.

int[]functioncolorHexToRGB(stringcolorHex)Global
stringfunctionRGBToColorHex(int[]rgb)Global
intfunctionRGBToInt(intR, intG, intB)Global

Convert R G B to single int (base 10 instead of base 16 for hex)

int[]functionIntToRGB(intRGBInt)Global

Opposite of RGBToInt. Convert RGBInt (base 10) to seperate R G B values and return float array. [0] = R, [1] = G, [2] = B

int[]functionColorIntToHSL(intiColor)Global
int[]functionRGBToHSL(intR, intG, intB)Global

rgb / hsl conversion functions I wrote from following this guide:
https://www.niwa.nu/2013/05/math-behind-colorspace-conversions-rgb-hsl/
convert RGB to HSL format and return in int array. [0] = H [1] = S [2] = L
S and L are ints between 0 and 100 (percent)

int[]functionHSLToRGB(intH, intS, intL)Global

convert HSL to RGB format and return in int array. [0] = R [1] = G [2] = B
S and L input should be between 0 and 100 (percent)

floatfunctionRGBMin(floatr, floatg, floatb)Global
floatfunctionRGBMax(floatr, floatg, floatb)Global
floatfunctionRGBChannel(floatt1, floatt2, floatc)Global
floatfunctionRGB_ClampBetween0and1(floatf)Global
stringfunctionAddColorFont(strings, intiColor)Global

for use in text replacement, such as in books, or MCM text.
Adds color font to string

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.