Skip to content

Documentation / @ripl/3d / rgbaToUnit

Function: rgbaToUnit() ​

rgbaToUnit(color): ColorUnitRGBA

Defined in: 3d/src/core/color.ts:47

Converts 0–255 RGBA channels to the 0–1 range the shading maths and GPU buffers use.

Parameters ​

ParameterType
colorColorRGBA

Returns ​

ColorUnitRGBA