zenity/internal/zenutil/osascripts/color.gojs

9 lines
221 B
Text
Raw Normal View History

2021-02-18 21:20:57 -05:00
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)) + ')'