Skip to main content
Version: 1.x

@microsoft/fast-colors > ColorRGBA64

ColorRGBA64 class

A RGBA color with 64 bit channels.

Signature:
export declare class ColorRGBA64 

Example

new ColorRGBA64(1, 0, 0, 1) // red

Constructors

ConstructorModifiersDescription
(constructor)(red, green, blue, alpha)Constructs a new instance of the ColorRGBA64 class

Properties

PropertyModifiersTypeDescription
anumberThe alpha value
bnumberThe blue value
gnumberThe green value
rnumberThe red value

Methods

MethodModifiersDescription
clamp()Returns a new ColorRGBA64 with channel values clamped between 0 and 1.
equalValue(rhs)Determines if one color is equal to another.
fromObject(data)staticConstruct a ColorRGBA64 from a ColorRGBA64Config
roundToPrecision(precision)Returns a new ColorRGBA64 rounded to the provided precision
toObject()Converts the ColorRGBA64 to a ColorRGBA64Config.
toStringHexARGB()Returns the color formatted as a string; #AARRGGBB
toStringHexRGB()Returns the color formatted as a string; #RRGGBB
toStringHexRGBA()Returns the color formatted as a string; #RRGGBBAA
toStringWebRGB()Returns the color formatted as a string; "rgb(0xRR, 0xGG, 0xBB)"
toStringWebRGBA()Returns the color formatted as a string; "rgba(0xRR, 0xGG, 0xBB, a)"