POV-Ray : Newsgroups : povray.binaries.utilities : New version of Farger.inc : Re: New version of Farger.inc Server Time
6 Oct 2022 12:56:39 EDT (-0400)
  Re: New version of Farger.inc  
From: Melody
Date: 22 Jan 2020 08:10:00
Message: <web.5e2848e3f66b17949da690110@news.povray.org>
Here's the last function to replace.
Returns the hue color you click, POV color 0-1;

function colorhue(i) {
  var z = 320;
  var v = .3 + .12 * i / z;
  var h = 1.0 - ((i % z) / z);
  if (i < 960) return "<"+roundv(hsv2rgb(h,1,v),6)+">";
  v = .33 + .12 * (i%960) / z;
  return "<"+roundv(hsl2rgb(h,1,v),6)+">";
}


Post a reply to this message

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