General

getting color value

Started by matias_thinKing on .

Sign in or create an account to join the conversation.

7 posts

Topic starter
hi all - is there a way of getting the value of a color after it has been chosen within the color palette? I would like to ensure I am using the exact same color on different objects as well as ensuring I go back to the right color from one chosen from the palette after making an object multi-colored. thank you in advance for any info. (side-note - I don't have photoshop or some other solution that would allow me to click on an area of the computer screen to pick the color within that pixel)
getattribute(object, attribute) doesnt give you what you want? I find it extremely useful to get direct 0 to 8355711 values for an object's color which I then also use directly in my scripts to set colors (instead of using rgb(r,g,b) or HSV(h,s,v))

Just set a monitor and set its value as
getattribute(desiredobject, 'color') 
where desiredobject = the object you wish to get its color value

(or colors depending on the object) ;)
interestingly, it's not returning the right color ... when re-painting the object with the color value returned from getattribute, it's coming back brighter than what it's set to. when I chose the color via the palette, I edited the shade via the HSV palette, so I'm wondering if somehow it's retaining the value before this adjustment in whatever variable getattribute returns
I shall keep testing, but the switch was set to only have 1 off color at the time I measured it, so colors didn't seem like the appropriate attribute. Thank you for the info none-the-less. whether it's a bug in the lemur software, or my own user error, we shall find out... but either way, you pointed me to the obvious answer I was seeking!