It is currently Sat Jul 06, 2024 7:38 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 ]


   Similar Topics   Replies 
No new posts Attachment(s) Staining option, How To Add - Color Pick

4

No new posts Reversing color edits on an image

7

No new posts How to access Image-Color Management - Discard profile with python_fu?

4

No new posts Attachment(s) GEGL Color Light Fusion (12 blend modes for color overlay)

9

No new posts Attachment(s) Background color chanage and typed text color change

8



* Login  



Powered by phpBB3 © phpBB Group