Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

41 lines (37 sloc) 1.14 kb
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>bundleUUID</key>
<string>4675F24E-6227-11D9-BFB1-000D93589AF6</string>
<key>command</key>
<string>#!/usr/bin/env ruby
prefix, def_col = '#', ''
if STDIN.read =~ /(#?)([0-9A-Fa-f]{6})/ then
prefix = $1
rgb = $2.scan(/../).map { |i| i.hex * 257 }
def_col = ' default color {' + rgb.join(",") + '}'
end
col = `osascript 2&gt;/dev/null -e 'tell app "TextMate" to choose color#{def_col}'`
exit 200 if col == ""
col = col.split(",").map { |i| i.to_i / 257 }
printf '%s%02X%02X%02X', prefix, *col
</string>
<key>fallbackInput</key>
<string>word</string>
<key>input</key>
<string>selection</string>
<key>keyEquivalent</key>
<string>@C</string>
<key>name</key>
<string>Insert Color…</string>
<key>output</key>
<string>replaceSelectedText</string>
<key>scope</key>
<string>source.sass</string>
<key>uuid</key>
<string>15DB6DEF-1236-4781-AC58-D5D7B8A76727</string>
</dict>
</plist>
Jump to Line
Something went wrong with that request. Please try again.