POV-Ray : Newsgroups : povray.binaries.scene-files : sRGB and hexadecimal conversions : sRGB and hexadecimal conversions Server Time
17 May 2024 07:39:27 EDT (-0400)
  sRGB and hexadecimal conversions  
From: Cousin Ricky
Date: 25 Mar 2014 20:45:00
Message: <web.53322269249b73ca192ae5f10@news.povray.org>
On occasion, I've found the need to take color samples of digital images in
situations such that using the eyedropper tool is too tedious.  POV-Ray's SDL
provides a convenient way to automate this, but POV-Ray's native color format
isn't always the most useful in other contexts.

I wrote an include file that converts linear colors to sRGB, and converts
integers or colors to hexadecimal strings.  It works POV-Ray 3.5 or later, but I
recommend 3.7, as it gives you easier control of image map gamma.  POV-Ray 3.7
also converts from sRGB to linear, which is not part of this include file.

Usage note:  With rare exceptions, I always use assumed_gamma 1.  I do not know
how relevant this file would be for any settings other than 1.


Post a reply to this message


Attachments:
Download 'srgb-inc.zip' (2 KB)

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