Convert rgba alpha value to microsoft gradient

/ Published in: JavaScript
Save to your folder(s)

A really fucking cool and easy way to calculate the alpha value for microsoft gradient using Javascript. Particularly useful in the Firebug console. Like a calculator.

Copy this code and paste it in your HTML
  1. // Replace 0.6 with your desired alpha level
  2. Math.floor(0.6 * 255).toString(16);
  4. //filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.