POV-Ray : Newsgroups : povray.binaries.utilities : New version of Farger.inc Server Time
25 Apr 2024 11:27:32 EDT (-0400)
  New version of Farger.inc (Message 28 to 37 of 40)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 3 Messages >>>
From: Melody
Subject: Re: New version of Farger.inc
Date: 24 Jan 2020 09:35:01
Message: <web.5e2aff65f66b17949da690110@news.povray.org>
thought it too much find in the maze, I was wrong.

EASY FIX. add this to jscolor.js -
IN function drawPicker(x, y) {
if (valueElement.value) MYColor = '#'+valueElement.value;

opens and gets the new color, yea.

only goofy part is if u open another while one is open.
that case, drawPicker() doesn't seem to fly first time or something.


Post a reply to this message

From: Melody
Subject: Re: New version of Farger.inc
Date: 24 Jan 2020 09:50:01
Message: <web.5e2b0402f66b17949da690110@news.povray.org>
got it! next version maybe. If you cant wait,

move MYColor = '#'+value;

to end of
this.exportColor = function(flags) {

like so ...
MYColor = '#'+value;
this.exportColor(flags);

it was setting, as if closing happened after opening new pricker.

goofy got fixed.


Post a reply to this message

From: Melody
Subject: Re: New version of Farger.inc
Date: 24 Jan 2020 11:25:00
Message: <web.5e2b19bdf66b17949da690110@news.povray.org>
got goofy to take a hike, description for hacking jscolor:

pickeropen = 1;pickeropen = 0;MYColor = '#'+value;
hidePicker() know the state
showPicker() know the state and halt lower layer functions.
fromHSV() only set on new color selection, not on close.
drawPicker() get color on open.
if (valueElement.value) MYColor = '#'+valueElement.value;

script sends new color to text input - update = newpicker();

this way u dont have to know which picker you're using,
when showing results.


Post a reply to this message


Attachments:
Download 'povcolorselect9.zip' (88 KB)

From: Melody
Subject: Re: New version of Farger.inc
Date: 24 Jan 2020 12:05:01
Message: <web.5e2b2289f66b17949da690110@news.povray.org>
// #declare X11_Web_Purple = rgb <0.501961, 0, 0.501961>;
// #declare farge_Purple_Web = rgb <0.501961, 0, 0.501961>;
// #declare farge_Patriarch = rgb <0.501961, 0, 0.501961>;

which ones should I delete ?


Post a reply to this message

From: Melody
Subject: Re: New version of Farger.inc
Date: 25 Jan 2020 06:50:00
Message: <web.5e2c2717f66b17949da690110@news.povray.org>
jscolor 1.4.2
All previously described quirks are gone.
No reopening to get the data, and consistently.
Have not seen an error for some time.

So I get the new one, 2.0.5

It's way different. Hacking with
if (this.valueElement.value) MYColor = '#'+this.valueElement.value;

this.show() is a good time to set vars, to get the color on open. WORKS!!

OK set a color with picker, fail permanently, menu reload, still broken, no
errors from the console. Must command line reload to restore limited function.

This must be rare, bugless interface with multiple jsColor pickers.
Running in Firefox 25, 45 and latest Chrome. here's jsColor 1.4.2 ...

Setting MYColor in 1.4.2 from only two places. everything working.
this.fromHSV()
function redrawPad()

No errors.
Click upper right field to copy picker-output in 3 forms! sweet.
ctrl shift alt click to send palette selection to 3 picker fields and translate.
And jscolor knows all about it; so that's your color on open.


Post a reply to this message


Attachments:
Download 'povcolorselect1.0.zip' (88 KB)

From: Melody
Subject: Re: New version of Farger.inc
Date: 25 Jan 2020 11:40:00
Message: <web.5e2c6f38f66b17949da690110@news.povray.org>
This came together in only hours not days,
 with all the previous work behind it.

Smaller faster using element events.
Still had to have the open/close trigger.
Using jscolor 2.0.5. Element events seem to have improved.
Knows which picker was opened and in use, and which picker was used.
Got to toss out 10 functions.


Post a reply to this message


Attachments:
Download 'povcolorselect2.0.zip' (49 KB)

From: Melody
Subject: Re: New version of Farger.inc
Date: 28 Jan 2020 19:15:01
Message: <web.5e30cdf2f66b17949da690110@news.povray.org>
only thing worse than posting junk is not coming back to fix it.

learned a lot, like, can't just add class= in the input tag,
and access properties.

rather than hacking a couple globals, which was all I needed;
instead, added this.open property. more complicated.
u have to do it all yourself that way.

showOnClick = false;
use the input tag events.

show and hide each picker yourself.
only picker that can set .open to false must be closed first.
just opening another picker only transforms the picker,
didn't actually call .hide(); so u have to do it.

i mean if u want it right.


Post a reply to this message


Attachments:
Download 'povcolorselect2.2.zip' (99 KB)

From: Melody
Subject: Re: New version of Farger.inc
Date: 28 Jan 2020 21:00:00
Message: <web.5e30e629f66b17949da690110@news.povray.org>
and it was being skiddish, which made me study it,

back to class ID method, updates have to be handled, as before.

end of send2picker() {
  call newpicker();
}

just do all.
 dont know the property for updating one. I got enough to remember.

that's all folks.


Post a reply to this message

From: Melody
Subject: Re: New version of Farger.inc
Date: 28 Jan 2020 22:30:00
Message: <web.5e30fba3f66b17949da690110@news.povray.org>
the first one ... doh.

goes in send2picker() {
// newpicker();
JC[wkey].value = e.value;
}


its never done


Post a reply to this message

From: jr
Subject: Re: New version of Farger.inc
Date: 16 Mar 2020 21:05:01
Message: <web.5e70216bf66b1794451952ca0@news.povray.org>
hi,

"Sven-Erik Andersen" <sve### [at] gmailcom> wrote:
> 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

I see that you've added 'Xona_com_Peacock', but the colour is different from
"peacock blue"; suggest adding:
  farge_Peacock_Blue = rgb <0.199219,0.628906,0.785156>

(values from BRLCAD's colour db).


regards, jr.


Post a reply to this message

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

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