Penpot plugins API
    Preparing search index...

    Interface Color

    Represents color properties in Penpot. This interface includes properties for defining solid colors, gradients, and image fills, along with metadata.

    interface Color {
        id?: string;
        fileId?: string;
        name?: string;
        path?: string;
        color?: string;
        opacity?: number;
        refId?: string;
        refFile?: string;
        gradient?: Gradient;
        image?: ImageData;
    }
    Index

    Properties

    id?: string

    The optional reference ID for an external color definition.

    fileId?: string

    The optional reference to an external file for the color definition.

    name?: string

    The optional name of the color.

    path?: string

    The optional path or category to which this color belongs.

    color?: string

    The optional solid color, represented as a string (e.g., '#FF5733').

    opacity?: number

    The optional opacity level of the color, ranging from 0 (fully transparent) to 1 (fully opaque). Defaults to 1 if omitted.

    refId?: string

    The optional reference ID for an external color definition.

    Use id instead

    refFile?: string

    The optional reference to an external file for the color definition.

    Use fileId

    gradient?: Gradient

    The optional gradient fill defined by a Gradient object.

    image?: ImageData

    The optional image fill defined by an ImageData object.