| 
									
										
										
										
											2017-03-03 09:54:46 -08:00
										 |  |  | ## Class: TouchBarColorPicker
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | > Create a color picker in the touch bar for native macOS applications
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-09 17:58:10 -03:00
										 |  |  | Process: [Main](../tutorial/application-architecture.md#main-and-renderer-processes) | 
					
						
							| 
									
										
										
										
											2017-03-03 09:54:46 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-17 10:38:15 -07:00
										 |  |  | ### `new TouchBarColorPicker(options)` _Experimental_
 | 
					
						
							| 
									
										
										
										
											2017-03-03 09:54:46 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | * `options` Object | 
					
						
							|  |  |  |   * `availableColors` String[] (optional) - Array of hex color strings to | 
					
						
							|  |  |  |     appear as possible colors to select. | 
					
						
							|  |  |  |   * `selectedColor` String (optional) - The selected hex color in the picker, | 
					
						
							|  |  |  |     i.e `#ABCDEF`. | 
					
						
							|  |  |  |   * `change` Function (optional) - Function to call when a color is selected. | 
					
						
							| 
									
										
										
										
											2017-11-29 11:38:35 +01:00
										 |  |  |     * `color` String - The color that the user selected from the picker. | 
					
						
							| 
									
										
										
										
											2017-03-03 09:54:46 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | ### Instance Properties
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | The following properties are available on instances of `TouchBarColorPicker`: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #### `touchBarColorPicker.availableColors`
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-04 16:14:41 +11:00
										 |  |  | A `String[]` array representing the color picker's available colors to select. Changing this value immediately | 
					
						
							| 
									
										
										
										
											2017-03-03 09:54:46 -08:00
										 |  |  | updates the color picker in the touch bar. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #### `touchBarColorPicker.selectedColor`
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-04 16:14:41 +11:00
										 |  |  | A `String` hex code representing the color picker's currently selected color. Changing this value immediately | 
					
						
							| 
									
										
										
										
											2017-03-03 09:54:46 -08:00
										 |  |  | updates the color picker in the touch bar. |