Coder Social home page Coder Social logo

fables-tales / beige-lib Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 182 KB

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

License: MIT License

Ruby 4.67% JavaScript 84.51% Python 10.81%

beige-lib's Introduction

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

beige-lib's People

Stargazers

Fable Tales avatar

Watchers

Fable Tales avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.