halostatue/color — Issue #2: Add Spectrum's functionality
Author: trans
Created: 2012-02-24 05:20:05+00:00
State: open

Came across this project today: https://github.com/twoism-dev/Spectrum. It's a rather small set of functions for extracting color references from strings.

Seems like that could be a good addition to color gem, and can do it better since it can return actual Color objects.

So maybe something like:

Color.extract_names('I love the color red, blue is awful') => { "red"=>RGB [#ff0000], "blue" => RGB [#ff00ff] }

Color.extract_css('I love the color #f00, #00f is awful') => { "#f00"=>RGB [#ff0000], "#00f" => RGB [#ff00ff] }