TLOpacityType

See source code

A type representing opacity values in tldraw.

Opacity values are numbers between 0 and 1, where 0 is fully transparent and 1 is fully opaque. This type is used throughout the editor to control the transparency of shapes, UI elements, and other visual components.

type TLOpacityType = number;

Example

const fullyOpaque: TLOpacityType = 1.0;
const halfTransparent: TLOpacityType = 0.5;
const fullyTransparent: TLOpacityType = 0.0;
const quarterOpaque: TLOpacityType = 0.25;
Prev
TLNoteShape
Next
TLPageId