internet explorer - Deciphering HEX RGBA for MS-filters in CSS -
i'm writing styles page i'd use rgba colors on background of list items. i've used css background property along rgba(146,138,118,.4) define transparent background color.
now i'm trying cover bases ie support using technique of ms-filter described in this article. (see heading "...and rgba all.")
the trouble apparently ms-filter requires use type of hybrid between rgba , hex alpha transparency value translated number between 00 , ff. see this description page microsoft reference.
so trouble can't figure out how on earth convert value rgba hex/rgba hybrid method. can point me reference material on this? please don't give me correct value - me no outside of color. need understand how behind it, thanks.
translating rgba
alpha gradient filter format simple. it's mapping interval [0, 1]
interval [0, 255]
, represented in hex. conversion, then, multiply 255
, convert hex. example, opacity in rgba(rr, gg, bb, 0.5)
ends 7f
(or 80
, if you're rounding up):
0.5 * 255 = 127.5 (base 10) 127 (base 10) = 7f (base 16)
i assume you're not asking how convert between base 10 , base 16.
Comments
Post a Comment