It is currently Sun Aug 30, 2026 2:17 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Help with "gimp-image-pick-color"
PostPosted: Tue Jan 05, 2021 10:14 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Mar 27, 2015
Posts: 22
Hi,

Using something like...
(colour '(1 2 3))
...
(gimp-message (string-append "colour " (number->string (car colour))))
returns 1
Which is good.

Using something like...

(colourR '(0 0 0))

(set! colourR (gimp-image-pick-color newImg activeLayer 128 8.0 FALSE FALSE 1))
(gimp-message (string-append "colour " (number->string (car colourR))))

gives an error.
Error: atom->string: bad base: 10

Running in the console
(gimp-image-pick-color newImg activeLayer 128 8.0 FALSE FALSE 1)
Returns
((210 210 210))

So my question is how do I access the data in the color returned from the color pick function?

Thanks for any help, I've been stuck on this for hours. :(


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Help with "gimp-image-pick-color"
PostPosted: Tue Jan 05, 2021 10:47 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Mar 27, 2015
Posts: 22
Hi,
got there.
"Even if the return value is itself a list, like for example the color returned by gimp-color-picker, the return value will always be encapsulated in an extra list."
double car.


Top
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group