HP Forums
invoke Choose color ? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: invoke Choose color ? (/thread-4991.html)



invoke Choose color ? - primer - 10-21-2015 09:43 PM

Hello,
anyone know if it's possible to invoke the color picker (from a program for example) ?

[Image: 2cwqvr8.png]

in ideal world, it would return #colorcode.
Thank you.
Best Regards.


RE: invoke Choose color ? - Tim Wessman - 10-21-2015 11:32 PM

Not at the time.


RE: invoke Choose color ? - DrD - 10-22-2015 08:48 AM

I don't know if this still works, but I have used it in the past:

ColorCube

-Dale-


RE: invoke Choose color ? - Tim Wessman - 10-22-2015 02:48 PM

So just for completeness here, are you looking for a way to open a standalone box? (similar to the CHOOSE command, let's call it COLORCHOOSE or something) As a component in an input form?

What would you like it to do?


RE: invoke Choose color ? - primer - 10-22-2015 03:23 PM

(10-22-2015 02:48 PM)Tim Wessman Wrote:  So just for completeness here, are you looking for a way to open a standalone box? (similar to the CHOOSE command, let's call it COLORCHOOSE or something) As a component in an input form?
yes, exactly.
(10-22-2015 02:48 PM)Tim Wessman Wrote:  What would you like it to do?
To return the picked #colorcode.

If possible, to be able to use in this way :
color:=COLORCHOOSE("pick forground"); // 1st param = box title. if not set, use std "choose color" title.

Regards.


RE: invoke Choose color ? - Tim Wessman - 10-22-2015 04:40 PM

COLORCHOOSE(<var>,"Title")

returns 0 for cancel, and 1 for success would be more appropriate I'd think. Else no way to determine if the user cancelled or picked.


RE: invoke Choose color ? - Arno K - 10-22-2015 08:45 PM

(10-21-2015 09:43 PM)primer Wrote:  Hello,
anyone know if it's possible to invoke the color picker (from a program for example) ?

[Image: 2cwqvr8.png]

in ideal world, it would return #colorcode.
Thank you.
Best Regards.

I had a look at Colorcube which seems to do what you want, it can be invoked from a program and run from the command line, the only thing to do before it can be run on newest firmware is to replace all occurrences of Cursor by for example Cursor1, I think about 6 times, then it compiles and runs fine.
Arno