[TxMt] web color palates for TM?

Jarkko Laine jarkko at jlaine.net
Thu Nov 25 09:23:18 UTC 2004


This is a grrrreat "plugin" and shows just how plain awesome the 
extensibility of TextMate is!!!

I had to change 'ruby' to '/usr/local/bin/ruby' to get the command to 
work. In command line even 'ruby' worked but when launched from 
TextMate, ruby was not found. This is probably an issue with the 
non-interactive/interactive shells that has been discussed before. 
Anyway, putting the whole path into the command helped.

The command also puts a newline character after the color value. This 
can be avoided by recording a macro where you:
1) Invoke the command.
2) Click right-arrow.
3) Click backspace.

This gets rid of the newline so you can add the semicolon right after 
the hex value ;-)

//jarkko

On 24.11.2004, at 21:34, Allan Odgaard wrote:

> On Nov 24, 2004, at 20:13, Allan Odgaard wrote:
>
>>> I made a quick little command for TextMate that shows a color 
>>> picker, and inserts the hex value.
>> Cool! :) Though you may want to mention that it requires Ruby 1.8.
>
> And for those w/o Ruby 1.8 here's a version which uses awk for the 
> formatting:
>
> osascript -e 'tell application "Finder" to activate' -e 'tell 
> application "Finder" to choose color'|tr -d ,|awk 
> '{printf("#%02x%02x%02x", $1/256, $2/256, $3/256)}'
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/mailman/listinfo/textmate
>
--
Jarkko Laine
http://jlaine.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2363 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20041125/8e798bb8/attachment.p7s>


More information about the textmate mailing list