Fix macOS color dialog.

This commit is contained in:
Nuno Cruces 2020-12-11 19:06:41 +00:00
parent 7cd382c0e9
commit 53fee94d3f
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ var scripts = template.Must(template.New("").Funcs(template.FuncMap{"json": func
return string(b), err return string(b), err
}}).Parse(` }}).Parse(`
{{define "color" -}} {{define "color" -}}
tell application (path to frontmost application as text) tell application "SystemUIServer"
activate activate
set c to choose color default color { {{index . 0}},{{index . 1}},{{index . 2}} } set c to choose color default color { {{index . 0}},{{index . 1}},{{index . 2}} }
"rgb(" & (item 1 of c) div 256 & "," & (item 2 of c) div 256 & "," & (item 3 of c) div 256 & ")" "rgb(" & (item 1 of c) div 256 & "," & (item 2 of c) div 256 & "," & (item 3 of c) div 256 & ")"

View File

@ -1,4 +1,4 @@
tell application (path to frontmost application as text) tell application "SystemUIServer"
activate activate
set c to choose color default color { {{index . 0}},{{index . 1}},{{index . 2}} } set c to choose color default color { {{index . 0}},{{index . 1}},{{index . 2}} }
"rgb(" & (item 1 of c) div 256 & "," & (item 2 of c) div 256 & "," & (item 3 of c) div 256 & ")" "rgb(" & (item 1 of c) div 256 & "," & (item 2 of c) div 256 & "," & (item 3 of c) div 256 & ")"