Color Question

Hey Everyone -

Maybe I am missing something obvious here but can someone please tell me how you get rgb colors to use in xcode?

For Example:


set background color of text field "photographer" of window type to {35591, 0, 0}

That makes color dark red. That isn’t even an rgb color, however if you plug in a real rgb number it doesn’t work at all (give black)


set background color of text field "photographer" of window type to {245, 160, 132}

Thanks

In AppleScript, RGB colors range from 0 to 65535.

Try something like this:

set background color of text field "photographer" of window type to {62965, 41120, 33924}

See also: RGB Color

Yes I am aware how the numbers are very different, however how did you convert my provided RGB into a color that applescript can read? Is there a pallette somewhere?

I tried:

set myGreenRGB to {245, 160, 132} as RGB color --result: {245, 160, 132}

Thanks,

Ryan

I’m assuming you have numbers based on 0-255 scale; I just multiplied the numbers by 257 (based on the fact the 255 * 257 = 65535).

Ha. Thanks!