Class: TouchBarColorPicker
Class: TouchBarColorPicker
Create a color picker in the touch bar for native macOS applications在触摸条中为本机macOS应用程序创建颜色选择器
Process:进程:Main
This class is not exported from the 此类不是从'electron'
module. 'electron'
模块导出的。It is only available as a return value of other methods in the Electron API.它只能作为Electron API中其他方法的返回值使用。
new TouchBarColorPicker(options)
Instance Properties实例属性
The following properties are available on instances of TouchBarColorPicker
:TouchBarColorPicker
实例上提供了以下属性:
touchBarColorPicker.availableColors
A 一个string[]
array representing the color picker's available colors to select. string[]
数组,表示要选择的颜色选择器的可用颜色。Changing this value immediately updates the color picker in the touch bar.更改此值会立即更新触摸栏中的颜色选择器。
touchBarColorPicker.selectedColor
A 一个string
hex code representing the color picker's currently selected color. string
,表示颜色选择器当前所选颜色的十六进制代码。Changing this value immediately updates the color picker in the touch bar.更改此值会立即更新触摸栏中的颜色选择器。