Interface AdjustedColorPanelProps

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

Hierarchy

  • HTMLAttributes<HTMLElement>
    • AdjustedColorPanelProps

Properties

autoColor?: AdjustedColor

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

autoColorLabel?: NonNullable<ReactNode>

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

Default Value

Automatic
autoColorPosition?: AutoColorPosition

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

Default Value

AutoColorPosition.Start
compareRGB?: boolean

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

Default Value

false
darkMode?: boolean
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)

Type declaration

    • (): void
    • Returns void

onElementLoad?: (() => void)

Type declaration

    • (): void
    • Returns void

onEyeDropStart?: (() => void)

Type declaration

    • (): void
    • Returns void

onEyeDropStop?: (() => void)

Type declaration

    • (): void
    • Returns void

onPreviewColor?: ((color) => void)

Type declaration

onPreviewColorImmediate?: ((color) => void)

Type declaration

onSelectColor?: ((color, isCustom) => void)

Type declaration

    • (color, isCustom): void
    • Parameters

      Returns void

previewColor?: AdjustedColor
previewDebounceTime?: number
recentColors?: readonly AdjustedColor[] | (() => readonly AdjustedColor[])

Type declaration

schemeLookup?: SchemeColorLookup

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

selectedColor: AdjustedColor
width?: number