mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-26 03:42:55 +00:00
11 lines
264 B
JavaScript
11 lines
264 B
JavaScript
.pragma library
|
|
|
|
function setAlphaF(solidColor, alpha) {
|
|
var solid = String(solidColor);
|
|
var alphaHex = Math.round(alpha * 255).toString(16);
|
|
|
|
if (alphaHex.length === 1)
|
|
alphaHex = "0" + alphaHex;
|
|
|
|
return "#" + alphaHex + solid.slice(1);
|
|
}
|