Skip to content
pixi-silk
GitHub repository
Function

rgbToHex

import { rgbToHex } from 'pixi-silk/ui/color';
function rgbToHex(rgb: RGB): number;

sRGB channels 0..1 to 0xRRGGBB. Channels are clamped to 0..1 and rounded.

Parameters#

ParameterType
rgbRGB

Returns#

number