Converts linear components to sRGB components.
vec3 or vec4 linear components.
Converts sRGB components to linear components.
vec3 or vec4 linear components.
Converts linear components to sRGB hexadecimal.
vec3 or vec4 linear components.
Converts sRGB hexadecimal to linear components.
vec3 or vec4 linear components.
Made by Don McCurdy • TypeDoc documentation • Copyright 2023, MIT license
ColorUtils
Common utilities for working with colors in vec3, vec4, or hexadecimal form.
Provides methods to convert linear components (vec3, vec4) to sRGB hex values. All colors in the glTF specification, excluding color textures, are linear. Hexadecimal values, in sRGB colorspace, are accessible through helper functions in the API as a convenience.