Skip to main content

Color

interface Color {
r: number
g: number
b: number
a: number
}

Represents a full Figma color value. These values are from 0 to 1. For example black is {r: 0, g: 0, b: 0, a: 1} and white is {r: 1, g: 1, b: 1, a: 1}.

All colors are specified in the same color space. This color space is sRGB in modern browsers and in the Figma desktop app is either sRGB or unmanaged depending on how you have it configured. Unmanaged means the color space is whatever the current color space is of your display.

HexCode

We also use the following type alias in our documentation to refer to a hex color string. Eg. "#FFFFFF".

type HexCode = string

On this page