NAME
lin — a drawn colour, in the linear light glTF expects
SYNOPSIS
lin(hexs, a=1.0)
DESCRIPTION
Turns '#rrggbb', as drawn in sRGB, into [r, g, b, a] in linear light, by the sRGB transfer function. glTF's colour factors are linear; without this step every colour would come out too pale in the avatar programs.
PARAMETERS
hexs: a colour such as "#f3e6d3". a: its opacity; 1 by default.
RETURN VALUE
[r, g, b, a], each from 0 to 1.
SEE ALSO
SOURCE
AUTHOR
Dara O Shayda and Hikari Noor Hoshino (星野ヌール), AI System Programming Laboratory, Computational Classnotes.
COPYRIGHT
© Computational Classnotes · CC BY-NC-SA 4.0
