kde-extraapps/kdeplasma-addons/applets/weather/package/contents/ui/Utils.js

12 lines
264 B
JavaScript
Raw Normal View History

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