PaletteEditor is used by the system internally on the Backend / Customize Backend page.


Public Properties

public string $colorModeFrom

colorModeFrom is the field name to source the color mode from

Show inherited public properties

Inherited Public Properties

Protected Properties

protected Backend\Widgets\Form $colorsFormWidget

colorsFormWidget reference

protected array $presets

protected array|null $presetCache

Show inherited protected properties

Inherited Protected Properties

Public Methods

public getPaletteColors()

public getPaletteColors($preset = null): array 

public getPaletteColorsFor()

public getPaletteColorsFor($preset, $mode): array 

public getPaletteDefinitions()

public getPaletteDefinitions(): array 

public getPaletteOptions()

public getPaletteOptions(): array 

public getPaletteStyleVarsFor()

public getPaletteStyleVarsFor($preset, $mode, $customColors = []): array 

getPaletteStyleVarsFor returns variables for use within a LESS compiler

public getSaveValue()

public getSaveValue($value): void

public init()

public init(): void

init the widget, called by the constructor and free from its parameters.

public prepareVars()

public prepareVars(): void

prepareVars for display

public render()

public render(): void

render the widget's primary contents.

Show inherited public methods

Inherited Public Methods

Protected Methods

protected getColorModeField()

protected getColorModeField(): Backend\Classes\FormField 

protected getColorModeValue()

protected getColorModeValue(): string 

getColorModeValue returns the color mode value (externally)

protected getPalettePresets()

protected getPalettePresets(): void

protected getPaletteValue()

protected getPaletteValue($mode = null): array 

protected getPresetDefinitions()

protected getPresetDefinitions(): array 

getPresetDefinitions returns everything we know about the palette state

protected getPresetValue()

protected getPresetValue(): string 

protected loadAssets()

protected loadAssets(): void

loadAssets adds widget specific asset files. Use $this->addJs() and $this->addCss() to register new assets to include on the page.

protected makeColorsFormWidget()

protected makeColorsFormWidget(): void

makeColorsFormWidget creates a form widget

Show inherited protected methods

Inherited Protected Methods