Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Normal-Tangerine8609/Scriptable-Widgets
/ rgbaToScriptable
Function
rgbaToScriptable
scripts/html-gradient.js:203–206 ·
view source on GitHub ↗
(r, g, b, a = 1)
Source
from the content-addressed store, hash-verified
201
return
scriptable;
202
203
function
rgbaToScriptable(r, g, b, a = 1) {
204
const
hex = (n) => n.toString(16).padStart(2,
"0"
);
205
return
new
Color(`#${hex(r)}${hex(g)}${hex(b)}`, a);
206
}
207
}
208
}
Callers
1
colorFromValue
Function · 0.85
Calls
1
hex
Function · 0.85
Tested by
no test coverage detected