Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • How are you calculating your "hue-rotate" reference values (e.g. #33EEFF -> #FF4433)? If you look at the reference implementation at drafts.fxtf.org/filter-effects/#feColorMatrixElement where it says "For type="hueRotate"", the formula appears to give #33EEFF -> #FFA190, which is also backed up by this runable answer: stackoverflow.com/questions/19187905/… which says "rgb(51,238,255) -> rgb(255,161,144)"
    – mclayton
    Commented Aug 14, 2023 at 21:19
  • 1
    @mclayton I was using mdigi.tools/change-color-hue/#33eeff but apparently what it considers 180 degrees, hue-rotate considers to be 90 degrees. I've now adjusted my question to reflect that.
    – Maybe
    Commented Aug 15, 2023 at 22:24
  • 1
    You might need to update the title of the 2 x "step 3"'s as well? Currently says "Hue-rotate *180∘" :-)...
    – mclayton
    Commented Aug 15, 2023 at 22:36
  • @mclayton Disregard what I said before, 90deg actually comes out to #FFA8FF; the way hue-rotate calculates the new color is completely different from how MDiGi (as well as Hue adjustment filters that can be found in programs like Photoshop) calculates things. Basically, it's based on HSL rather than RGB, which is why it's so different. I've got my own set of functions for this Hex -> RGB -> HSL -> Hex process, and I'll post them in a supplemental answer soon... maybe today or tomorrow.
    – Maybe
    Commented Aug 17, 2023 at 1:36
  • @mclayton Took me a bit, but I finished it: stackoverflow.com/a/76974490
    – Maybe
    Commented Aug 25, 2023 at 5:36