Error setting hexadecimal color via execute command

realitiesmarcel shared this problem 3 years ago
Not a Problem

Hi,

I am getting an error setting the color of an object (in my case a point) with the execute command:

I have a point called A. Pasting this into the input bar works:

SetColor( A, "#ffa5ff00")

But pasting this into the input bar gives me an error: "Please check your input":

Execute[{"SetColor( A, "#ffa5ff00")"}]

Is something wrong with the formatting here?

Any help on this is very much appreciated

Best,

Marcel

Comments (3)

photo
2

The quotes don't match. You can either use SetColor( <Object>, <Red>, <Green>, <Blue> ) or define

col="#ffa5ff00"
and use that

photo
3

try Execute[{"SetColor( A, "unicodetoletter(34)"#ffa5ff00"UnicodeToLetter(34)")"}]

photo
1

Thank you very much! Both solutions work perfectly for me. I just can't decide which one I like more :D

© 2023 International GeoGebra Institute