Skip to content
This repository

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.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 spec
Octocat-spinner-32 src
Octocat-spinner-32 vendor
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rvmrc
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.mdown
Octocat-spinner-32 Rakefile
Octocat-spinner-32 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.