Skip to content

Instantly share code, notes, and snippets.

@starrhorne
Created January 19, 2012 02:36
Show Gist options
  • Save starrhorne/1637322 to your computer and use it in GitHub Desktop.
Save starrhorne/1637322 to your computer and use it in GitHub Desktop.
# Rakefile
desc "Create new color swatches"
task :swatches do
require "yaml"
YAML.load_file("swatches.yml").each do |name, color|
p "Creating: #{name} (#{color}) => images/colors/#{name}.png"
%x[ convert -size 16x16 xc:white -draw "stroke #666666 fill white rectangle 0,0 15,15" -draw "stroke white fill #{color} rectangle 1,1 14,14" "images/colors/#{name}.png" ]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment