Re: [csswg-drafts] [css-color-hdr] Add CSS property to limit dynamic range of HDR content (#9074)

The CSS Working Group just discussed `[css-color-hdr] Add CSS property to limit dynamic range of HDR content`, and agreed to the following:

* `RESOLVED: proposal as stated goes into the draft, with the name switched to match the other mix functions`

<details><summary>The full IRC log of that discussion</summary>
&lt;chris> q+ to say we need this<br>
&lt;TabAtkins> cc: Now that all smartphoens are shooting hdr, that's well and good but maybe I want to restric tit to sdr<br>
&lt;TabAtkins> cc: [shows a video]<br>
&lt;TabAtkins> cc: you can see as i hover these images the're getting brighter, going from sdr to hdr<br>
&lt;TabAtkins> cc: the proposal now is that there's a property where you can say "i'm sdr, don't go brighter than white"<br>
&lt;TabAtkins> cc: high which goes to high, and MISSED which is on mac and goes in between<br>
&lt;TabAtkins> cc: exposing the actual params to do this is a privacy issue, which is why we abstract to a few values<br>
&lt;TabAtkins> cc: also what they map to will dpeend on os, device, ambient lighting, etc<br>
&lt;TabAtkins> cc: so going with enumerate values is ideal<br>
&lt;TabAtkins> cc: and to animate them, there's a mix() function that's added<br>
&lt;TabAtkins> cc: we've prototyped this, response by testers has been positive<br>
&lt;emilio> q+<br>
&lt;TabAtkins> cc: so we'd like to start discussing this as part of a path<br>
&lt;astearns> ack chris<br>
&lt;Zakim> chris, you wanted to say we need this<br>
&lt;TabAtkins> chris: there's def a need for this. i like that it's an enumeration<br>
&lt;TabAtkins> chris: trying to do it properly with a website detecting the light level in your room would have signif privacy problems<br>
&lt;TabAtkins> chris: and there is really a neeed, if you have a bunch of hdr all together, some will use it subtly, some will be looking directly into the sun, and that'll be very distracting<br>
&lt;TabAtkins> chris: but you also want to slam everything to sdr<br>
&lt;TabAtkins> chris: so having a slightly brighter, but still usable around other iamges, is good<br>
&lt;astearns> ack emilio<br>
&lt;TabAtkins> chris: i think this proposal is great, i'd like to accept it<br>
&lt;TabAtkins> emilio: does this also affect css color? or just image/video<br>
&lt;TabAtkins> cc: in theory all content, but right now image/video is the only thing that can invoke it. but eventually canvas and css color<br>
&lt;TabAtkins> cc: it's inherited, so you can spec on an element and everything in there will be the right headroom<br>
&lt;TabAtkins> cc: but it doesn't force - you can set a parent to standard, and one child can pull its headroom up<br>
&lt;TabAtkins> emilio: ok, about animation, the idea is a mix() that lets you interpolate in a non-discrete way<br>
&lt;chris> q+<br>
&lt;TabAtkins> emilio: it seems fine, but maybe too specific for this particular property. maybe something more general we could do?<br>
&lt;TabAtkins> emilio: but the rest of the proposal seems fine<br>
&lt;TabAtkins> cc: yeah i'd welcome guidacne on these things but I was going with advice. a general mix() could be nice, but i was guided to this specific one and it felt reasonable.<br>
&lt;TabAtkins> emilio: it's fine. colors are pretty special, i'm just a bit worried about proliferating<br>
&lt;bradk> would cross-fade() work?<br>
&lt;TabAtkins> cc: one alt we discussed is you specify animate A->B, you get mix(..., A, B)<br>
&lt;TabAtkins> cc: alt is the ua lies and gives a discrete answer, the closest keyword, while it's actually doing something gradual<br>
&lt;TabAtkins> cc: i can't imagine that would be problematic, but...<br>
&lt;TabAtkins> emilio: yeah that could be a bit weird - a discrete property that animates continuously but *looks* like it animates discretely<br>
&lt;TabAtkins> emilio: one more bit of feedback is that the "mix" part of the name should be at the end to match color-mix()<br>
&lt;TabAtkins> fantasai: i think instead of having a mix function the property could just take a percentage<br>
&lt;TabAtkins> fantasai: where 0% means sdr, 100% means high, and if you want the limited range instead of high use another keyword<br>
&lt;TabAtkins> fantasai: we often create percents in the property value, we use mix functions only where ther'es not appropriate<br>
&lt;chris> I'm on the q to respond on the mix animation btw<br>
&lt;TabAtkins> dbaron: note that elika's proposal doesn't handle "constrained high to high", so that would need fixing<br>
&lt;flackr> +1<br>
&lt;TabAtkins> emilio: is "constrained high" a value between 0 and 100, or something more complex?<br>
&lt;TabAtkins> cc: not actually a %, it's slightly different formula<br>
&lt;TabAtkins> cc: on my device high is 16, sdr is 1, constrained is 2<br>
&lt;TabAtkins> cc: so i'd be hesitant to add a value for it<br>
&lt;chris> q?<br>
&lt;TabAtkins> cc: and if you have multiple pages using this, you want constrained high to look the same everywhere<br>
&lt;TabAtkins> cc: if the keyword has a qualitative meaning that could be a little hacky<br>
&lt;TabAtkins> cc: so the underlying value behind the scenes is a headroom that goes from 0 to [undefined]. 4 is pretty standard<br>
&lt;TabAtkins> cc: we could map constrained high to a number but i don't want people picking numbers from a hat<br>
&lt;TabAtkins> emilio: yeah we could have a keyword that computes to a %, but I guess we don't want to expose that %<br>
&lt;TabAtkins> dbaron: going back to privacy point, we *don't* want to expose where the mid value relative to the other two<br>
&lt;astearns> ack chris<br>
&lt;TabAtkins> chris: yes i was on the queue for that. we're animating something we can't do discrete animation for<br>
&lt;TabAtkins> chris: suddenly switching from sdr to hdr is whiplash for your eyes<br>
&lt;TabAtkins> chris: if you look at apple's demo, if they get a request for hdr they gradually dim things then slowly bring up the brightness, it looks nice<br>
&lt;TabAtkins> chris: but as david said we don't want to expose where that midpoint is<br>
&lt;astearns> ack dbaron<br>
&lt;Zakim> dbaron, you wanted to ask about inheriting<br>
&lt;TabAtkins> dbaron: chris mentioned inheritance<br>
&lt;TabAtkins> dbaron: wanted some more details on that decision<br>
&lt;florian> q+<br>
&lt;TabAtkins> dbaron: i'm a little suspicious about inherited because - wondering if there are cases where you need to know all the data inside something to know how you're gonna map it<br>
&lt;florian> q-<br>
&lt;florian> q+ to follow up on dbaron 's point<br>
&lt;TabAtkins> dbaron: if it's the case that you wanna take some hdr content and map it to sdr, and you need to know everything in there to do that, you might not want this inherited<br>
&lt;TabAtkins> dbaron: because then you lose the ability to coherently process the idea of everything inside of this<br>
&lt;TabAtkins> dbaron: because it;s basically  set all over the place rather than a coherent whole<br>
&lt;TabAtkins> cc: when it comes to each individual hdr elem - say you have two images, one goes to very bright, other to slightly bright<br>
&lt;TabAtkins> cc: they're tone-mapped independently<br>
&lt;TabAtkins> cc: my sense is that we probably don't want to do "map this whole element together"<br>
&lt;TabAtkins> dbaron: this is probably more relevant once it applies to CSS colors than to images/canvas, too<br>
&lt;TabAtkins> cc: if this is done as a group, my sense is that the semantics is everything below that element in the hierarchy would be constrained to the parent<br>
&lt;emilio> q+<br>
&lt;TabAtkins> cc: this is more a per-element effect right now<br>
&lt;TabAtkins> cc: my main goal here is ergonomics of the usage<br>
&lt;TabAtkins> cc: and if what i'm suggesting doesn't match those goals, we can change it<br>
&lt;TabAtkins> dbaron: that makes sense, and i'll note that both things we're describing do exist in CSS sometimes - inherited, and "inherited" but grouping<br>
&lt;TabAtkins> cc: i'll restate we're not doing the goruping thing here. there will need to be a larger investigation into that problem<br>
&lt;astearns> ack fantasai<br>
&lt;TabAtkins> fantasai: the name of the proeprty doesn't communicate color , and "dynamic range" is used elsewhere. can we communicate color somewhere?<br>
&lt;TabAtkins> cc: the name comes from (dynamic-range) MQ<br>
&lt;TabAtkins> fantasai: right which i also don't like<br>
&lt;TabAtkins> cc: I think the consistency of the two is good - they use the same enum values<br>
&lt;TabAtkins> cc: And while dynamic-range can apply to any stimulus, maybe best to match for now<br>
&lt;TabAtkins> fantasai: ugh maybe an alias to the MQ<br>
&lt;TabAtkins> astearns: maybe we could put the proposal as-is into the draft, and then open an issue about aliasing the MQ and change the HDR draft to match<br>
&lt;astearns> ack florian<br>
&lt;Zakim> florian, you wanted to follow up on dbaron 's point<br>
&lt;TabAtkins> astearns: but i do like the consistency<br>
&lt;TabAtkins> florian: for naming, i'm not sure i agree with elika<br>
&lt;emilio> q- (was going to talk about inheritance)<br>
&lt;emilio> q-<br>
&lt;TabAtkins> florian: in theory it could be other ranges but in practice css is mostly visual<br>
&lt;TabAtkins> fantasai: but if you don't know much about colors you won't find this when you search for "color"<br>
&lt;TabAtkins> chris: if you search for "dynamic range" on a search engine, this is what will come up<br>
&lt;TabAtkins> fantasai: but it's something about your color<br>
&lt;fantasai> fantasai: if you don't know color terminology you might never find it<br>
&lt;fantasai> s/know/know proper/<br>
&lt;TabAtkins> florian: next point, to david's discussion, if we get out of videos/images and go to css colors, it does get harder to reason about for an author<br>
&lt;emilio> q+<br>
&lt;TabAtkins> florian: if you have a bunch of nested elements, some are tranparent, compositing, etc, i'm sure there's an answer to that mathematically but do we really want it?<br>
&lt;TabAtkins> florian: a grouping mode based on inheritance could be more limiting, but if it doesn't do anything useufl it will just be extra complications<br>
&lt;TabAtkins> q+<br>
&lt;TabAtkins> emilio: if we are doing this non-inheriting thing we will need an auto value that pulls the value down<br>
&lt;fantasai> scribe+<br>
&lt;TabAtkins> emilio: what's the default?<br>
&lt;TabAtkins> cc: i have the default matching the current browser behavior - high<br>
&lt;TabAtkins> emilio: i think inheriting makes sense, maybe an auto value that's the default and we can interpolate...<br>
&lt;astearns> ack emilio<br>
&lt;TabAtkins> emilio: it gets tricky<br>
&lt;TabAtkins> dbaron: I think what's needed to udnerstand is whether a grouping behavior is needed. only if the answer is yes do we need to know whether the element is inherited or non-inherited<br>
&lt;emilio> ack emilio<br>
&lt;emilio> ack TabAtkins<br>
&lt;fantasai> TabAtkins: I thought,  What are any of you talking about, you can always set a property on a subtree inherited or not?<br>
&lt;fantasai> TabAtkins: but if it's triggering a grouping effect, then that could make sense<br>
&lt;fantasai> dbaron: Not grouping behavior exactly, but if you take a bunch of HDR content and map it down<br>
&lt;fantasai> dbaron: does limiting A and B together when A is higher, change how B gets mapped?<br>
&lt;fantasai> TabAtkins: That is grouping behavior, establishing a group<br>
&lt;fantasai> TabAtkins: but it's not part of this proposal, so if we want to do that we can do a non-inherited property for it later<br>
&lt;dbaron> (I'm not sure that it would be a separate property...)<br>
&lt;TabAtkins> astearns: I'm seeing a lot of general agreement<br>
&lt;TabAtkins> astearns: I propose we add this proposal as stated to the hdr draft, adn we can raise issues as needed<br>
&lt;dbaron> +1<br>
&lt;kbabbitt> +1<br>
&lt;TabAtkins> cc: with the dynamic-range-mix() name switched<br>
&lt;fantasai> -> https://github.com/w3c/csswg-drafts/issues/9957<br>
&lt;TabAtkins> RESOLVED: proposal as stated goes into the draft, with the name switched to match the other mix functions<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9074#issuecomment-1944290486 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 14 February 2024 17:31:58 UTC