|
|
"Kenneth" <kdw### [at] gmailcom> wrote:
> "Kenneth" <kdw### [at] gmailcom> wrote:
> > Ive <ive### [at] lilysoftorg> wrote:
> > > The correct functions would be
> > > [snip]
I don't have my initial experiments on hand, and I may have coded something
equivalent, but I will have to graph what you have to see for sure.
> If I want to *multiply* an RGB color, rgb 0.7*<.3,.5,.7> would be OK to do.
Yes. I do this all the time, and is what clipka mentioned was fine.
> But if I want to multiply an SRGB color, srgb 0.7*<.3,.5,.7> would NOT be the
> correct way to do it,
Right, which is what he was telling me at the time.
> to get the 'expected' color result (if I understand some
> of Clipka's older remarks); I would instead need to use a somewhat different
> multiplication scheme. Is that what these 'multiplication functions' are for--
> the way to properly 'multiply' an SRGB color?
Well, let's say that's the _goal_. My functions are wrong, I'm assuming I've's
are correct.
I _should_ have done what I normally do to self-check, which is convert an rgb
color to srgb, and then use the srgb to rgb conversion to convert it back, and
get the original value.
> Or is srgb 0.7*<.3,.5,.7> perfectly OK by itself?
it is not. When you invoke the srgb keyword, it "moves" you from a linear
interpolation to a non-linear interpolation. And you have to "do the
multiplication" _inside_ of that nonlinear "space". I guess maybe you can see
it as moving by a factor M along the curve, rather than along the line.
> Or am I way off base as to what the functions themselves are meant for?
I think you get the general gist of it, if not the explicit details.
I can't remember what time I worked this out - but It may have been a bit late
and it seemed to be what I was shooting for rather than the technically correct
rgb to srgb conversion and multiplication. But I probably should have stated
that AND provided a proper way for comparison as well.
And to be fair - we've had formula errors lurking in the source for ~25 years
without anyone noticing.... so...
;)
Thanks, Ive, for catching this and pointing it out.
I'll have to go back to it again and not be so lax in double-triple checking,
back-checking, and graphing the results.
I of course would love to hear any commentary you might have on mapping the
lighting and image and pigment curves to each other....
Post a reply to this message
|
|