in reply to Fixing bad CSS in EPUB files

inverse_color() ...calculates a complementary color

"complement" and "invert" are not the same (SO), be specific. + I don't think flipping alpha makes sense. + Flipping saturation/lightness makes no sense neither. hsl(0,100%,50%) i.e. red should invert to aqua i.e. hsl(180,100%,50%), not to grey/gray as your function does.