ASE.rb
A general purpose library for reading and writing Adobe Swatch Exchange files in Ruby. ASE files can be used across the entire Adobe Creative Suite (Photoshop, Illustrator, etc).
Installation
Add this line to your application's Gemfile:
gem 'ase'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ase
Usage
Writing
doc = ASE.new
palette = ASE::Palette.new('My Colors')
palette.add 'Black', ASE::Color.new(0, 0, 0)
palette.add 'Red', ASE::Color.from_hex('#ff0000')
doc << palette
doc.to_file('path/to/file.ase')
Reading
doc = ASE.from_file('path/to/file.ase')
puts doc['My Colors']['Red'].to_rgb
#=> [255, 0, 0]
puts doc['My Colors'].size
#=> 2
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request