Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Beige provides a targeted CCI (colour classification interface) to establish whether a colour can be classed as beige or not.
JavaScript Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
spec/javascripts
src
vendor
.gitignore
.rvmrc
Gemfile
LICENSE
README.mdown
Rakefile
index.html

README.mdown

Beige

Beige provides a targeted CCI (colour classification interface) to establish whether a colour can be classed as beige or not.

Tests

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 ...
..........................................

Usage

Import beige.js into your app. The rest is used for tuning and viewing beige.

Tuning

$ open index.html

Tune the coefficients, then update beige.js with the new updated Beige.coefficients

TODO

  • Efficiently randomly generate a beige
  • Use WebGL to display the beige claw on canvas
  • Calculate how distant a colour is from the beige claw

Plotting

  • 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
Something went wrong with that request. Please try again.