js-util

Home > rc-js-util > RgbaColorPacker

RgbaColorPacker class

Utility for packing and unpacking RGBA into int32 with one byte per channel.

Signature:

export declare class RgbaColorPacker 

Methods

Method Modifiers Description
generateRandomPackedRGBA() static  
getHexColorString(value) static Given a packed color, produce a dom color string like #FF0000.
makeDomColorString(color) static Given a packed color, produce a dom color string like rgba(255, 255, 255, 1).
packColor(r, g, b, a) static  
unpackA(color) static  
unpackB(color) static  
unpackG(color) static  
unpackR(color) static