i guess such small code samples are rarely sent here hold my beer.. (i always liked this piece of code, although it never seemed to appeal much to anyone else whenever it was brought up. maybe it's because i actually needed it for a project: storing argb color in various compact forms, either as uint32 or packed into an __m128i, where i had to multply alpha values from nested containers and it was beneficial to do it in-place, as bytes, without extracting to float and repacking etc..) https://gist.github.com/d7samurai/f98cb2aa30a6d73e62a65a376d24c6da