<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Yep. See, for example #applySimpleGamma:to: in Cuis. Or
ImageProcessing.pck.st</p>
<p>BitBlt works essentially only on gamma space. But you need more
than 8 bits per band to do image processing with reasonable
quality. Usually Floating Point is best.</p>
<div class="moz-cite-prefix">On 2025-12-09 5:21 PM, Nicolas Cellier
via Cuis-dev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAKnRiT4AbUFUNiGrSXm3W-62Hoeoh3NVTtfh7_aoKsuTMby+ZQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>A connexe subject, here is one article explaining the gamma
correction and sRGB color space</div>
<div><a
href="https://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/"
moz-do-not-send="true" class="moz-txt-link-freetext">https://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/</a><br>
</div>
<div>Normally most image processing should be performed in
linear RGB color space, and I don't think that our BitBlt
primitives really follow this rule...<br>
</div>
<div>Nicolas</div>
</div>
<br>
<div class="gmail_quote gmail_quote_container">
<div dir="ltr" class="gmail_attr">Le mar. 9 déc. 2025 à 19:46,
Juan Vuletich via Cuis-dev <<a
href="mailto:cuis-dev@lists.cuis.st" moz-do-not-send="true"
class="moz-txt-link-freetext">cuis-dev@lists.cuis.st</a>>
a écrit :<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p><br>
</p>
<div>On 2025-12-09 3:07 PM, Luciano Notarfrancesco via
Cuis-dev wrote:<br>
</div>
<blockquote type="cite">
<div dir="auto">On Wed, Dec 10, 2025 at 00:21 Juan
Vuletich <<a href="mailto:juan@cuis.st"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">juan@cuis.st</a>>
wrote:</div>
<div dir="auto">
<div class="gmail_quote">
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"
dir="auto"> <br>
Why didn't you use 0.0 and 1.0 as min and max
values?</blockquote>
<div dir="auto"><br>
</div>
<div dir="auto">I just followed the specification. The
chroma parameter doesn’t really have an upper limit,
I’m not sure why it was made in this way. In
practice, it doesn’t seem to make a difference to go
over 0.5, and CSS uses 0.4 as 100%.</div>
</div>
</div>
</blockquote>
<p>I wasn't clear. Apologies. I mean, in #okl:c:h: I read</p>
<p> min := -0.00001.<br>
max := 1.00001.</p>
<p>I think I'd prefer 0.0 and 1.0, unless there's some
reason for that I don't see.</p>
<blockquote type="cite">
<div dir="auto">
<div class="gmail_quote">
<div dir="auto"><br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"
dir="auto">Would you provide the conversion from
sRGB (i.e. our Color instances) to <br>
OkLCH? That is really needed too. I'd also want an
instance creation <br>
method that answers nil if parameters lie outside
our sRGB space of <br>
Color instances (i.e. if the OkLCH values can not be
accurately <br>
represented by an instance of Color). Does
#okOrNilL:c:h: sound <br>
reasonable? Any better option? With these two, I
could do something like <br>
#experimentsTowardsANewColorPalette but using this
better color space.<br>
</blockquote>
<div dir="auto"><br>
</div>
<div dir="auto">Yeah, my idea was to try to do some
sort of parallel protocol for different color
spaces, something like aColor okLChDo: [:L :C :h|
…], HSLDo:, etc. Later we could rethink messages
like #hue (that currently returns the HSL hue, and
its different to the OkLCH hue), and I’m not sure if
we should eliminate those methods or make a unifying
choice of a specific color space and coordinates. </div>
</div>
</div>
</blockquote>
At least #okLCHhue, #okLCHluminance and #okLCHchroma are
needed as a first step, it would be great if you could cook
those. We can later decide if we want to keep HSL or not. We
may decide to remove it.
<blockquote type="cite">
<div dir="auto">
<div class="gmail_quote">
<div dir="auto">The message okOrNilL:c:h: might be ok,
aother option could be okl:c:h:ifFail: with a block
as argument, not sure. </div>
</div>
</div>
</blockquote>
<p>Yep. That's good too.</p>
<blockquote type="cite">
<div dir="auto">
<div class="gmail_quote">
<div dir="auto">And perhaps later we could start
cleaning up all those messages like
veryVeryMuchDarker, quiteDarker, etc, or come up
with something better (should again look at what
designers do for these things, I think).</div>
<div dir="auto"><br>
</div>
<div dir="auto"><br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"
dir="auto">Finally, it would be wonderful to migrate
all our theme related stuff to <br>
this. This is so much better! Also, all our 'groups
of shades' and <br>
'transformations' methods look so primitive... We
really need to update <br>
all that stuff.<br>
</blockquote>
<div dir="auto"><br>
</div>
<div dir="auto">Yes, absolutely, I think it would be
great. I’ll try to help with anything necessary,
perhaps do it in small steps so that we don’t break
everyones themes. Hopefully more people will be
interested in helping with all this… it’s a fun
project and there are many small parts to it.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Cheers,</div>
<div dir="auto">Luciano</div>
</div>
</div>
</blockquote>
<p>Thanks,</p>
<pre cols="72">--
Juan Vuletich
<a href="http://www.cuis.st" target="_blank" moz-do-not-send="true">www.cuis.st</a>
<a href="http://github.com/jvuletich" target="_blank"
moz-do-not-send="true">github.com/jvuletich</a>
<a href="http://researchgate.net/profile/Juan-Vuletich" target="_blank"
moz-do-not-send="true">researchgate.net/profile/Juan-Vuletich</a>
<a href="http://independent.academia.edu/JuanVuletich" target="_blank"
moz-do-not-send="true">independent.academia.edu/JuanVuletich</a>
<a href="http://patents.justia.com/inventor/juan-manuel-vuletich"
target="_blank" moz-do-not-send="true">patents.justia.com/inventor/juan-manuel-vuletich</a></pre>
</div>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
</blockquote>
<pre class="moz-signature" cols="72">--
Juan Vuletich
<a class="moz-txt-link-abbreviated" href="http://www.cuis.st">www.cuis.st</a>
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich</pre>
</body>
</html>