POV-Ray : Newsgroups : povray.binaries.utilities : New version of Farger.inc Server Time
20 Apr 2024 06:37:21 EDT (-0400)
  New version of Farger.inc (Message 11 to 20 of 40)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Melody
Subject: Re: New version of Farger.inc
Date: 18 Jan 2020 06:20:00
Message: <web.5e22e8faf66b17949da690110@news.povray.org>
function patchHighLight(i) {
  var w = Width, sz = patchSize;
  var m = Math.floor(w/sz);
  var x = (i % m) * sz;
  var y = Math.floor(i / m) * sz;
  GG.setColor("#FFFFFF");
  GG.drawRect(x,y,sz,sz);
  GG.paint();
}

and add patchHighLight(m);
in mouseDwn

now you need to invert the color of the frame;
white on white wont do much, heh.
i see names then go, ??? where was that ??
 lol

highlight it.


Post a reply to this message

From: Melody
Subject: Re: New version of Farger.inc
Date: 18 Jan 2020 20:40:00
Message: <web.5e23b338f66b17949da690110@news.povray.org>
Forgot something. Now can click on text field.
Don't need to unless clipboard fails.
function mousedwn() looks like this.

  var m = Math.floor(Width/patchSize);
  if ((mousex < (patchSize * m)) && (mousey > 22)) {
    echo(" ");
    m = whichcolor();
    patchHighLight(m);
    buffer(m);
  }


Post a reply to this message

From: Sven-Erik Andersen
Subject: Re: New version of Farger.inc
Date: 19 Jan 2020 16:15:01
Message: <web.5e24c5bbf66b1794d26876bc0@news.povray.org>
Releases a large update. The include-files have been split into separate files.
Added more named colors, a total now of 6568 colors.

Also improved the simple documentation with a separate HTML-file for each
include-file that shows the color name, the RGB HEX-value, a color sample and a
button that will copy the color name to the clipboard.

Updated version is available on GitHub at
https://github.com/SvenErik1968/Farger.inc/

Brgds,
Sven-Erik


Post a reply to this message


Attachments:
Download 'farger.inc-4.0.zip' (229 KB)

From: Melody
Subject: Re: New version of Farger.inc
Date: 20 Jan 2020 01:00:00
Message: <web.5e2540e3f66b17949da690110@news.povray.org>
> 0 not 22,

offset a layer, have to remember the offset. doh
here's the update.


Post a reply to this message


Attachments:
Download 'povcolorselect.zip' (34 KB)

From: Melody
Subject: Re: New version of Farger.inc
Date: 22 Jan 2020 06:40:01
Message: <web.5e2832f9f66b17949da690110@news.povray.org>
And again !! in previous version, old html was saved. doh!
Previous wasn't offset 22.

Now, this one is for Michael who seemed to not get HSV.
Button says click. Click it! HSV HSL ta dah.
Example usage.

Unnamed - just says "rgb" til I figure out what colorhue(i) will be;
to get back to POV colors, reload.

In C, the routines ran fine. Translated to java was giving negative numbers.
I usually find that kind of stuff. Nope. I just clamped 0-1 and it's fine.


Post a reply to this message


Attachments:
Download 'povcolorselect2.zip' (35 KB)

From: Melody
Subject: Re: New version of Farger.inc
Date: 22 Jan 2020 06:55:01
Message: <web.5e283746f66b17949da690110@news.povray.org>
so thats what happens when you go over 1 input.
you get negative numbers, now I know.

that routine wasnt supposed the increment saturation, it was already at 1, I
forgot that.


Post a reply to this message


Attachments:
Download 'povcolorselect3.zip' (35 KB)

From: Melody
Subject: Re: New version of Farger.inc
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

From: Melody
Subject: Re: New version of Farger.inc
Date: 22 Jan 2020 08:55:01
Message: <web.5e28532ef66b17949da690110@news.povray.org>
Here's the whole thing if u don't want to DIY.
Added 1920 unique names for the hue colors.
Maybe it's done now, always something else.


Post a reply to this message


Attachments:
Download 'povcolorselect4.zip' (35 KB)

From: Bald Eagle
Subject: Re: New version of Farger.inc
Date: 22 Jan 2020 15:50:00
Message: <web.5e28b4f3f66b17944eec112d0@news.povray.org>
So, this is very cool - most especially since it runs in JS, which is fast,
real-time, and runs in a browser.

This would be a great cross-platform pigment-map editor if JS has easily
editable sliders or something like that.  No clunky OS-dependent installation,
nearly everyone always has a browser window of some sort open...



Such a thing would be especially useful for constructing the pigment_maps for
patterns, since it's a hard thing to visualize, code, edit, and iteratively
render until it's "right"/pleasing.

http://news.povray.org/povray.binaries.images/thread/%3C5acf08bc%241%40news.povray.org%3E/

or for spitting out a prototype pigment_map for something sampled from an image,
that could them be fine-tuned and adjusted.

http://news.povray.org/povray.binaries.images/thread/%3Cweb.58cfc0cf857600e8c437ac910%40news.povray.org%3E/?mtop=41


Post a reply to this message

From: Melody
Subject: Re: New version of Farger.inc
Date: 23 Jan 2020 01:15:00
Message: <web.5e293923f66b17949da690110@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> So, this is very cool - most especially since it runs in JS, which is fast,
> real-time, and runs in a browser.
>
> This would be a great cross-platform pigment-map editor if JS has easily
> editable sliders or something like that.  No clunky OS-dependent installation,
> nearly everyone always has a browser window of some sort open...
>
>
>
> Such a thing would be especially useful for constructing the pigment_maps for
> patterns, since it's a hard thing to visualize, code, edit, and iteratively
> render until it's "right"/pleasing.
>
>
http://news.povray.org/povray.binaries.images/thread/%3C5acf08bc%241%40news.povray.org%3E/
>
> or for spitting out a prototype pigment_map for something sampled from an image,
> that could them be fine-tuned and adjusted.
>
>
http://news.povray.org/povray.binaries.images/thread/%3Cweb.58cfc0cf857600e8c437ac910%40news.povray.org%3E/?mtop=41

Dream realized - Java is the cross platform solution.
Well if you like that, here's more.
Added 4 JS color pickers.

Firefox 25, no clipboard, but everything else is fine.
Latest Chrome, everything fine.I'll post an image, and this url.
color pickers not using clipboard ... displays 3 forms on the BGcolor.
I think it needs a switch to turn clipboard on off maybe.


Post a reply to this message


Attachments:
Download 'povcolorselect5.zip' (49 KB)

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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