zenity/internal/zenutil/osascripts/color.gojs
2021-02-19 02:40:46 +00:00

9 lines
221 B
Plaintext

var app = Application.currentApplication()
app.includeStandardAdditions = true
app.activate()
var opts = {}
opts.defaultColor = {{json .}}
var res = app.chooseColor(opts)
'rgb(' + res.map(x => Math.round(x * 255)) + ')'