SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface ColorPanelProps

    interface ColorPanelProps {
        autoColor?: IColor | null;
        autoColorLabel?: NonNullable<ReactNode>;
        autoColorLabelKey?: string;
        autoColorPosition?: AutoColorPosition;
        compareRGB?: boolean;
        darkMode?: boolean;
        defaultButtonSize?: number;
        disableAlpha?: boolean;
        initialPanelType?: ColorPanelType;
        onDone?: () => void;
        onElementLoad?: () => void;
        onEyeDropStart?: () => void;
        onEyeDropStop?: () => void;
        onPreviewColor?: (color: IColor | null) => void;
        onPreviewColorImmediate?: (color: IColor | null) => void;
        onSelectColor?: (color: IColor | null, isCustom: boolean) => void;
        previewColor?: IColor | null;
        previewDebounceTime?: number;
        recentColors?: readonly IColor[] | (() => readonly IColor[]);
        schemeLookup?: SchemeLookup;
        selectedColor: IColor | null;
        width?: number;
    }

    Hierarchy

    • HTMLAttributes<HTMLElement>
      • ColorPanelProps
    Index
    autoColor?: IColor | null

    If autoColor is set then a special Swatch is created that will use this color. When it is selected or previewed the color passed will be null any consumer will then know to use the auto color

    null means there is no automatic value to offer — distinct from omitting it, which lets a command's own context supply one. A picker that has already committed to a concrete fill has nothing sensible to put behind an "automatic" swatch.

    autoColorLabel?: NonNullable<ReactNode>

    If autoColor is specified then a label will be shown. This is ignored if autoColor is not specified.

    Automatic
    
    autoColorLabelKey?: string

    A message key for the auto-color label, resolved through this panel's own (language-subscribed) translator. Prefer this over pre-resolving autoColorLabel upstream: a string resolved in a command-group render callback is baked into the element once (via the module-level t) and can freeze on its key if the pack lands after that render. autoColorLabel (a literal node) still wins when both are given.

    autoColorPosition?: AutoColorPosition

    If autoColor is specified then a label will be shown. This is ignored if autoColor is not specified.

    AutoColorPosition.Start
    
    compareRGB?: boolean

    Determines if Adjustable colors with similar RGB values are considered the same.

    false
    
    darkMode?: boolean
    defaultButtonSize?: number

    Defaults to 24px

    disableAlpha?: boolean

    Defaults to false

    initialPanelType?: ColorPanelType

    If not specified or null then this will be determined based on whether the selected color is available in the presets (not include recent)

    onDone?: () => void
    onElementLoad?: () => void
    onEyeDropStart?: () => void
    onEyeDropStop?: () => void
    onPreviewColor?: (color: IColor | null) => void
    onPreviewColorImmediate?: (color: IColor | null) => void
    onSelectColor?: (color: IColor | null, isCustom: boolean) => void
    previewColor?: IColor | null
    previewDebounceTime?: number
    recentColors?: readonly IColor[] | (() => readonly IColor[])
    schemeLookup?: SchemeLookup

    Required to generate theme palettes. If not specified then DocTheme colors are used

    selectedColor: IColor | null

    null means no color of its own — the AUTO swatch is the selected one.

    width?: number