#ff362f — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #ff362f, aggregated by home.social.
-
@xero nice code!
I see you're actually calculating things rather than rendering them with a browser (see nf.color2hex in nofus.js, which I use mostly for userscripts). I assume your way is significantly faster.
Given your goal of minification, do you want
redto gain a byte with#f00? I seetransparentmaps torgba(0,0,0,0)but it could be#0000.Idea for you: a configurable maximum distance (default=0) per color channel to permit rounding, e.g. 4 means
#ff362fbecomes#f33since 0x33 is within 4 of both 0x36 and 0x2f.(I suppose it'd be better to use the sum of differences or some more sophisticated combination, perhaps keyed to a percent, but that's a dangerous rabbithole of researching color perception (e g. OKLCH). Determining a sane thresholding system and ideal values won't be easy.)