Header menu logo fable-electron-docs-api

TouchBarColorPicker Type

⚠ Process Availability: Main ✔ | Renderer ❌ | Utility ❌ | Exported ❌

Create a color picker in the touch bar for native macOS applicationsProcess: Main This class is not exported from the 'electron' module. It is only available as a return value of other methods in the Electron API.

Constructors

Constructor Description

TouchBarColorPicker(?availableColors, ?selectedColor, ?change)

Full Usage: TouchBarColorPicker(?availableColors, ?selectedColor, ?change)

Parameters:
    ?availableColors : string[] - Array of hex color strings to appear as possible colors to select.
    ?selectedColor : string - The selected hex color in the picker, i.e #ABCDEF.
    ?change : string -> unit - Function to call when a color is selected.

Returns: TouchBarColorPicker
?availableColors : string[]

Array of hex color strings to appear as possible colors to select.

?selectedColor : string

The selected hex color in the picker, i.e #ABCDEF.

?change : string -> unit

Function to call when a color is selected.

Returns: TouchBarColorPicker

Instance members

Instance member Description

this.availableColors

Full Usage: this.availableColors

A string[] array representing the color picker's available colors to select. Changing this value immediately updates the color picker in the touch bar.

this.selectedColor

Full Usage: this.selectedColor

A string hex code representing the color picker's currently selected color. Changing this value immediately updates the color picker in the touch bar.

Type something to start searching.