1
0

Improved docstring

This commit is contained in:
Jon Michael Aanes 2024-07-10 19:18:46 +02:00
parent 4db343f284
commit f68031e365
Signed by: Jmaa
SSH Key Fingerprint: SHA256:Ab0GfHGCblESJx7JRE4fj4bFy/KRpeLhi41y4pF3sNA

View File

@ -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