diff --git a/colors.lua b/colors.lua index ca76e9e..a04d803 100644 --- a/colors.lua +++ b/colors.lua @@ -1,21 +1,18 @@ ---[[ - This is a collection of functions for performing color operations, - designed to work with the LÖVE game engine. - - LICENSE is BEER-WARE. - - # Documentation # - - Supports following color formats: - - - `rgb255`: The standard computer representation, with each - channel (red, green, blue, alpha) in the [0-255] range. Alpha - channel (index 4), can either be explicit or implicit (and taken - to be 255.) - - `rgb1`: As above, except channels are in the [0-1] range. - - `hsl`: Hue-saturation-lightness representation (does not support alpha). - Hue channel is in the [0-1] range, instead of the standard [0-2*pi] range. -]] +--- Colors +-- +-- This is a collection of functions for performing color operations, designed to work with the LÖVE game engine. +-- +-- ## Documentation +-- +-- Supports following color formats: +-- +-- * `rgb255`: The standard computer representation, with each +-- channel (red, green, blue, alpha) in the [0-255] range. Alpha +-- channel (index 4), can either be explicit or implicit (and taken +-- to be 255.) +-- * `rgb1`: As above, except channels are in the [0-1] range. +-- * `hsl`: Hue-saturation-lightness representation (does not support alpha). +-- Hue channel is in the [0-1] range, instead of the standard [0-2*pi] range. local GAMMA = 2.2 local GAMMA_INV = 1/GAMMA