Choose color with script
-
- Posts: 0
- Joined: Sun Jan 03, 2010 3:45 pm
Choose color with script
Hi,I have a script that resizes an image to fill the screen by adding a border.I would like the option of selecting the color by an actual color table, not by selecting a hex number.The dictionary was no help.Any suggestions?TIA,Robert PolandGraphicConverter 8.0 (854)2.7 GHz Intel Core I5, 27” iMac 12 GB Ram, 1TB HD, OS 10.7.3
-
- Posts: 0
- Joined: Fri Dec 30, 2016 12:00 pm
Re: Choose color with script
Hi,you have to set the color value directly in hex/decimal (range 0..65535).Thorsten On 18.05.2012, at 15:54, Robert Poland wrote: Hi,I have a script that resizes an image to fill the screen by adding a border.I would like the option of selecting the color by an actual color table, not by selecting a hex number.The dictionary was no help.Any suggestions?TIA,
-
- Posts: 0
- Joined: Sun Jan 03, 2010 3:45 pm
Re: Choose color with script
Thorsten,If I run the following script I get the error, GraphicConverter got an error: Can't set foreground color to {32000}.tell application "GraphicConverter" activate set foreground color to {32000}end tell On May 18, 2012, at 8:21 AM, Thorsten Lemke wrote:Hi,you have to set the color value directly in hex/decimal (range 0..65535).ThorstenOn 18.05.2012, at 15:54, Robert Poland wrote:Hi,I have a script that resizes an image to fill the screen by adding a border.< div>I would like the option of selecting the color by an actual colo r table, not by selecting a hex number.The dictionary was no help.Any suggestions?TIA, Robert Poland - Fort Collins, CO
-
- Posts: 0
- Joined: Sun Jan 03, 2010 3:45 pm
Re: Choose color with script
Thorsten,my apologies, I forgot to "tell window 1" tell window 1 to set foreground color to {32000}That works. On May 18, 2012, at 8:21 AM, Thorsten Lemke wrote:Hi,you have to set the color value directly in hex/decimal (range 0..65535).ThorstenOn 18.05.2012, at 15:54, Robert Poland wrote:Hi,I have a script that resizes an image to fill the screen by adding a border.< div>I would like the option of selecting the color by an actual colo r table, not by selecting a hex number.The dictionary was no help.Any suggestions?TIA, Robert Poland - Fort Collins, CO
-
- Posts: 0
- Joined: Sun Jan 03, 2010 3:45 pm
Re: Choose color with script
Thorsten,Interesting, {0} is Black and {65535} is red, not white. On May 18, 2012, at 8:21 AM, Thorsten Lemke wrote:Hi,you have to set the color value directly in hex/decimal (range 0..65535).ThorstenOn 18.05.2012, at 15:54, Robert Poland wrote:Hi,I have a script that resizes an image to fill the screen by adding a border.< div>I would like the option of selecting the color by an actual colo r table, not by selecting a hex number.The dictionary was no help.Any suggestions?TIA, Robert Poland - Fort Collins, CO
-
- Posts: 0
- Joined: Fri Dec 30, 2016 12:00 pm
Re: Choose color with script
Hello Robert,a color is defined this way:black {0, 0, 0]white {65535, 65535, 65535}A color has always the components red, green and blue (in that order).Thorsten On 18.05.2012, at 16:42, Robert Poland wrote: Thorsten,Interesting, {0} is Black and {65535} is red, not white.On May 18, 2012, at 8:21 AM, Thorsten Lemke wrote:.
-
- Posts: 0
- Joined: Sun Jan 03, 2010 3:45 pm
Re: Choose color with script
Thanks Chris, That's what I was looking for. I copied to the GC site as apparently it is a well kept secret. On May 22, 2012, at 6:00 PM, Christopher Nebel wrote: > On May 18, 2012, at 6:54 AM, Robert Poland <rpoland@usa.net> wrote: > >> I have a script that resizes an image to fill the screen by adding a border. >> >> I would like the option of selecting the color by an actual color table, not by selecting a hex number. >> >> The dictionary was no help. >> >> Any suggestions? > > Aside from "choose color" in Standard Additions? > > > --Chris N. Robert Poland - Fort Collins, CO