Colr.rb
Colr selects colors based on hue calculations. It knows nothing about the image before initialization and works with any valid HTML color: red, green, aqua, brown, etc.
Colr allows you to adjust the tolerance and hue settings so you can select colors from any image!
Example:
@colr = Colr.new('input.png')
@colr.select(:red).save("red.png")
# To select all the colors:
Colr.new('input.png').select(:yellow, 40, -40).save("yellow.png")
Colr.new('input.png').select(:red).save("red.png")
Colr.new('input.png').select(:green, 30, -60).save("green.png")
Colr.new('input.png').select(:blue, 20, -50).save("blue.png")
Colr.new('input.png').select(:violet, 20, -70).save("violet.png")