类:TouchBarColorPicker
类:TouchBarColorPicker
🌐 Class: TouchBarColorPicker
为本地 macOS 应用在触控栏创建一个颜色选择器
进程: 主进程
此类未从 'electron' 模块导出。它仅作为 Electron API 中其他方法的返回值提供。
new TouchBarColorPicker(options)
实例属性
🌐 Instance Properties
TouchBarColorPicker 实例上可用的属性如下:
🌐 The following properties are available on instances of TouchBarColorPicker:
touchBarColorPicker.availableColors
一个 string[] 数组,表示颜色选择器可供选择的颜色。更改此值会立即更新触控栏中的颜色选择器。
🌐 A string[] array representing the color picker's available colors to select. Changing this value immediately
updates the color picker in the touch bar.
touchBarColorPicker.selectedColor
一个 string 十六进制代码,表示颜色选择器当前选中的颜色。更改此值会立即更新触控栏中的颜色选择器。
🌐 A string hex code representing the color picker's currently selected color. Changing this value immediately
updates the color picker in the touch bar.