Skip to main content

Rgba

A colour in gamma-encoded sRGB. Channels are 0 to 255, alpha is 0 to 1.

This is an interface exported by @mapcairn/theme, checked against version 0.2.0.

Signature​

import type { Rgba } from "@mapcairn/theme";

interface Rgba

Properties​

a​

a: number;

Opacity, 0 (clear) to 1 (opaque). A translucent colour is composited over a backdrop before its contrast is measured.

b​

b: number;

Blue, 0 to 255, gamma-encoded.

g​

g: number;

Green, 0 to 255, gamma-encoded.

r​

r: number;

Red, 0 to 255, gamma-encoded.

Source: packages/theme/src/contrast.ts:11