POV-Ray : Newsgroups : povray.newusers : Colour conversion - HTML to RGB : Re: Colour conversion - HTML to RGB Server Time
30 Jul 2024 02:21:44 EDT (-0400)
  Re: Colour conversion - HTML to RGB  
From: David Robinson
Date: 3 Nov 2004 09:51:05
Message: <4188f059$1@news.povray.org>
"David Robinson" <tdf### [at] ezrscom> wrote in message
news:4187b634$1@news.povray.org...
> "Warp" <war### [at] tagpovrayorg> wrote in message
> news:4186b975@news.povray.org...
> > Mike Williams <nos### [at] econymdemoncouk> wrote:
> > > Looks good, and only needs a couple of tiny fixes for it to give the
> > > correct results.
> >
> >   Like what?
> >
> >   I know it gives garbage if you give it something else than a hex
number,
> > but I assumed the input is always ok.
> >
> Just this:
>
> rgbf<int(value/65536), mod(int(value/256), 256), mod(value,256)>
>
> Thanks a lot though, great script, works beautifully :)
>
No wait, I got that wrong. After running a few values through, a lot of
colours seem to come out as white, so it must be a maths thing...?

David


Post a reply to this message

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