Beige provides a targeted CCI (colour classification interface) to establish whether a colour can be classed as beige or not.
All of the tests are written in Jasmine. To run the tests, you will first need to install Ruby and Bundler. Once you have this:
$ bundle install
$ rake jasmine
Open your browser to http://localhost:8888
If you want to run the tests directly in the console just type:
$ rake jasmine:ci
/Users/theo/.rvm/rubies/ruby-1.9.3-p0/bin/ruby -S rspec spec/javascripts/support/jasmine_runner.rb --colour --format progress
[2012-03-15 15:46:50] INFO WEBrick 1.3.1
[2012-03-15 15:46:50] INFO ruby 1.9.3 (2011-10-30) [x86_64-darwin11.1.0]
[2012-03-15 15:46:50] INFO WEBrick::HTTPServer#start: pid=39919 port=63714
Waiting for jasmine server on 63714...
jasmine server started.
Waiting for suite to finish in browser ...
..........................................
Import beige.js
into your app. The rest is used for tuning and viewing beige.
$ open index.html
Tune the coefficients, then update beige.js
with the new updated Beige.coefficients
- Efficiently randomly generate a beige
- Use WebGL to display the beige claw on canvas
- Calculate how distant a colour is from the beige claw
- in spec/javascripts there's a plotter called plot.py
- install matplotlib:
easy_install matplotlib
- change into that directory
- run:
cat BeigeSpec.js | grep -i "true" | grep -o "#......" > beige_colors.txt
cat BeigeSpec.js | grep -i "false" | grep -o "#......" > not_beige.txt
- run
python plot.py