Re: [compositing] Incorrect recommended implemntation of mix-blend-mode: saturation

On Fri, Apr 2, 2021 at 9:40 AM Callum Morrisson
<morrisson.callum@gmail.com> wrote:
>
> It's unclear why you would think adobe products should dictate a web standard. The colorspaces in web development (atleast at the minute) are RGB and/or HSL. Within that frame of reference, "adobe" and this bastardised version of saturation make no sense. Similarly the idea that Luminance should be derived from the YIQ color space also seems to make no sense (I went down a rabithole looking for where those magic numbers come from, and the Y(Luma) in YIQ seems to be it).

Note that the definition of Luminance and Saturation here have nothing
to do with LCH. LCH is actually based on measuring human vision, and
converting to it from RGB requires some non-trivial matrix math, which
is definitely not going on here. Everything in this spec is RGB-based.

The spec's notion of Saturation isn't quite HSL saturation (HSL
saturation is (max - min) / (max + min), or a slight variant if the
color is lighter than 50%), but it's close. The spec's notion of
Luminance is a reasonably common quick-and-dirty approximation of
human-vision luminance based on RGB channels; it's not accurate, but
it's close and fast to compute.

Using Adobe's definitions here made sense, because between PDF,
Photoshop, and other tools, and the large swathe of non-Adobe graphics
tools that nevertheless want to present similar options to aid in
usability, these definitions should be familiar to designers coming
from such software. There doesn't seem to be a great reason to be
gratuitously different, particularly since the math underlying HSL
isn't very human-compatible in the first place. It does mean that if
you're trying to reason about what exactly will happen to an image by
thinking about its HSL colors you'll be slightly misled, yes, but
that's a tradeoff we felt was reasonable to make given the concordance
with existing graphic design software.

~TJ

Received on Friday, 2 April 2021 17:45:58 UTC