I only started using TinyColor a few days ago due to its inclusion in project I'm hacking on, and one of the things I really needed was good RGBA hex output for UI theme scripting in Sublime Edit.
After an hour of confusing colour shifts and head scratching I'm not getting back, I spotted the ARGB note and sort of fell into a nostalgic flashback of slow redraws, flickering backgrounds and Zune vs iPod arguments…
I noticed it's been on the wish list for ages, so here you go… code, tests and docs and hopefully no change to toFilter. I've added some new tests and tweaked a few others - a few .5's have become .4 or .6 so that Hex4 values can be tested, but only where the .5 seemed arbitrary
The old ARGB behaviour is in a new utility function rgbaToArgb() so the both internal and second colours can use it when setting the filter. I've scoured and grep'ed for things that needed to be updated… let me know if I've missed anything. (The very tidy) Style, low complexity and ES3ness has all been respected… Should satisfy #133
I only started using TinyColor a few days ago due to its inclusion in project I'm hacking on, and one of the things I really needed was good RGBA hex output for UI theme scripting in Sublime Edit.
After an hour of confusing colour shifts and head scratching I'm not getting back, I spotted the ARGB note and sort of fell into a nostalgic flashback of slow redraws, flickering backgrounds and Zune vs iPod arguments…
I noticed it's been on the wish list for ages, so here you go… code, tests and docs and hopefully no change to
toFilter
. I've added some new tests and tweaked a few others - a few .5's have become .4 or .6 so that Hex4 values can be tested, but only where the .5 seemed arbitraryThe old ARGB behaviour is in a new utility function
rgbaToArgb()
so the both internal and second colours can use it when setting the filter. I've scoured and grep'ed for things that needed to be updated… let me know if I've missed anything. (The very tidy) Style, low complexity and ES3ness has all been respected… Should satisfy #133