HSLuv

The HSLuv module provides an implementation of the HSLuv color space and APIs to convert between RGB and HSLuv. The implementation is heavily inspired by the HSLuv-lua project. These APIs are not intended to be used directly, but rather are used internally by the Color class.

API

class UI.HSLuv: LibTSMModule
staticmethod ToRGB(h: number, s: number, l: number): (r: number, g: number, b: number)

Converts from HSLuv to RGB

staticmethod FromRGB(r: number, g: number, b: number): (h: number, s: number, l: number)

Converts from RGB to HSLuv