kde-extraapps/kdeplasma-addons/applets/weather/package/contents/ui/Utils.js
2015-01-15 17:07:43 +00:00

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);
}