chroma
chroma copied to clipboard
Ruby gem for color manipulation and palette generation
# Problem Seems like currently `Chroma::Color` generates wrong RGB from HEX8. Here is a proof that `#eb09b9c4` has to be `235, 9, 185`: But `Chroma::Color#rgb` returns `9, 185, 196`: ```ruby...
Hi, This is my favorite color manipulation gem, but I see its development was halted some years ago. It it still maintained? Will you accept pull requests?
According to this https://www.atlantbh.com/how_to_detect_colour_brightness_in_ruby/ brightness should be calculated as ``` sqre(red^2 * 0.299 + green^2 * 0.587 + blue^2 * 0.114) ``` rather than ``` red * 0.299 + green...
I know chroma has a `to_rgb` method, but it's actually a port of tinyColor's [`toRgbString`](https://github.com/bgrins/TinyColor#torgbstring). I am interested in adding a method to this lib which will output a hash...
I just came across this gem in an attempt to autogenerate some colors for chart.js. It's very cool and working quite well so far. Thank you for all the hard...
For example: ``` ruby "hsv(100, 75%, 50%)".paint.to_hex # got: "#408020" expected: "#3F7F1F" ``` In fact `#3F7F1F` is `hsv(100, 75%, 50.2%)`. _Rounding error._
It would be nice, for those of us who are hex-impaired, to be able to see it in a browser somehow. Maybe just export to HTML string for starters?
At minimum need to support the `:as` option. ``` ruby Chroma.define_palette :dynamic_palette do |opts| spin opts[:angle] || 90 end 'red'.paint.foo(angle: 60, as: :rgb) ```
Need to test more colors in public API. Also, need to test internal classes and some private APIs.