I was determined to crack this nut: Convert #ff9933
- style color values into rgba(255,100,50,1)
-style color values, so that it would be easy to manipulate alpha opacity — and eventually to perform other regular transformations (such as color-rotations and contrast checks) easily, since [split[,]]
is intuitive to work with…
The actual numeric conversion (in regexp) wasn’t too hard (and I reverse-engineered the steps needed to wrestle it into a javascript macro)… but I struggled a bit to figure out how to leverage those transformed color strings (as yielded by a javascript macro) within local css declarations. (It required plenty of trial-and-error to get the right alignment between a macro-invoking variable and the <$wikify>
widget needed for the css.)
I suspect I reinvented some wheels here, and stole other wheels there… and none of the work is efficient! Also, I still haven’t bundled opacity-specification into the javascript macro as a proper parameter; the opacity-fade illustration is currently achieved by search-replace.
But feel free to poke around, take what you like, and/or school me on how I could have done all of this much more simply!