POV-Ray : Newsgroups : povray.general : What clipka actually said about the srgb keywords : What clipka actually said about the srgb keywords Server Time
20 May 2024 17:14:46 EDT (-0400)
  What clipka actually said about the srgb keywords  
From: Cousin Ricky
Date: 14 Aug 2023 14:09:13
Message: <64da6dc9$1@news.povray.org>
I just ran across these comments while looking for something else.
Clipka's initial warning was:
  https://news.povray.org/58625d1f%241%40news.povray.org

His correction to the initial warning:
  https://news.povray.org/5862ea88%241%40news.povray.org

To summarize the two posts:

  ... you need to use

      #declare C = srgb <R,G,B>;
      colour C * Brightness

  rather than

      colour srgb <R,G,B>*Brightness

  because the latter would be interpreted as

      colour srgb (<R,G,B>*Brightness)

My response was:
  The moral seems to be get all of your srgb declarations out of the way
  as early as possible--including before you do any math on such colors.

This is in agreement with what Ive and I said in Kenneth's thread two
years ago, less the note about byte triplets.  I can see how confusion
could arise about dividing by 255, but that situation is different.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.