POV-Ray : Newsgroups : povray.general : QUESTION: Programming: Converting Floats to 255-Integers : Re: QUESTION: Programming: Converting Floats to 255-Integers Server Time
25 Jun 2024 22:57:48 EDT (-0400)
  Re: QUESTION: Programming: Converting Floats to 255-Integers  
From: Bald Eagle
Date: 27 Apr 2018 14:10:06
Message: <web.5ae3674d955d7bcbc437ac910@news.povray.org>
Sven Littkowski <I### [at] SvenLittkowskiname> wrote:
> I am
> asking around here, how to convert the usual COLOR RGB float values of
> POV-Ray for red, green and blue into the integers for color definitions
> that go from 0 to 255.

Usually I'm converting from some other program's color-picking output, so I do
<126, 40, 83>/255

So since you'll be going the other way - just multiply by 255.


Post a reply to this message

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