mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
944 B
944 B
Class: TouchBarColorPicker
Create a color picker in the touch bar for native macOS applications
Process: Main
new TouchBarColorPicker(options)
optionsObjectavailableColorsString[] (optional) - Array of hex color strings to appear as possible colors to select.selectedColorString (optional) - The selected hex color in the picker, i.e#ABCDEF.changeFunction (optional) - Function to call when a color is selected.
Instance Properties
The following properties are available on instances of TouchBarColorPicker:
touchBarColorPicker.availableColors
The color picker's available colors to select. Changing this value immediately updates the color picker in the touch bar.
touchBarColorPicker.selectedColor
The color picker's currently selected color. Changing this value immediately updates the color picker in the touch bar.