We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given a color #ff7fec it has actual RGB values: R:236, G:255, B:127 (http://www.colorhexa.com/ecff7f) However:
#ff7fec
R:236, G:255, B:127
Paleta::Color.new(:hex, 'ff7fec')
produces this object:
#<Paleta::Color:0x007fdfe9bf8058 @blue=236, @green=127, @hex="FF7FEC", @hue=308.90625, @lightness=74.90196078, @red=255, @saturation=100.0>
which has wrong red, green, blue values: ... @blue=236, @green=127... @red=255 and it's returned wrong when to_array is used:
... @blue=236, @green=127... @red=255
to_array
[25] pry(main)> Paleta::Color.new(:hex, '#ff7fec').to_array => [255, 127, 236]
The text was updated successfully, but these errors were encountered:
Hi @tomaszgiba
The link you pasted is for #ecff7f, not #ff7fec which is what you ran through paleta.
#ecff7f
#ff7fec is definitely rgb(255, 127, 236), which is what paleta returned.
rgb(255, 127, 236)
Also be careful to note that the website you are linking to shows RGB values on a 0..100 scale, whereas paleta uses a 0..255 scale.
Hope that helps!
Sorry, something went wrong.
Sorry, I was on a wild bug hunt. You are obviously right.
Thanks @jordanstephens
No branches or pull requests
Given a color
#ff7fec
it has actual RGB values:R:236, G:255, B:127
(http://www.colorhexa.com/ecff7f)However:
Paleta::Color.new(:hex, 'ff7fec')
produces this object:
which has wrong red, green, blue values:
... @blue=236, @green=127... @red=255
and it's returned wrong when
to_array
is used:The text was updated successfully, but these errors were encountered: