I'd like to ask you whether there is a possibility to make your code do the inversion by inverting the brightness of the colors instead of the RGB values? This way we'd get a smart conversion that keeps the colors and invert only the whites and blacks.
Would it be too CPU intesive? Would it be possible at all to do that as an extension?
If I'm not mistaken, then the heavy RGB -> HSL -> modification -> RGB conversion could be reduced easily by rotating the RGB values in HSL format by 180 degrees without converting them to HSL.
Dear Maiself,
I'd like to ask you whether there is a possibility to make your code do the inversion by inverting the brightness of the colors instead of the RGB values? This way we'd get a smart conversion that keeps the colors and invert only the whites and blacks.
Would it be too CPU intesive? Would it be possible at all to do that as an extension?
If I'm not mistaken, then the heavy RGB -> HSL -> modification -> RGB conversion could be reduced easily by rotating the RGB values in HSL format by 180 degrees without converting them to HSL.
Thanks.