Skip to content
New issue

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

Color formats (RGB, Hex, and HSL) #6

Closed
hersha opened this issue Aug 7, 2013 · 1 comment
Closed

Color formats (RGB, Hex, and HSL) #6

hersha opened this issue Aug 7, 2013 · 1 comment

Comments

@hersha
Copy link

hersha commented Aug 7, 2013

I saw this in the todo list and thought I'd give it a go. I wrote some classes to quickly generate the correct color values for the HUE. I'll post the pull request in a but for review but basically its implemented like this:
Calling RGB.new(123,231,222).to_hue, HexRGB.new("7BD5DE").to_hue or HSL.new(185.45, 0.60, 0.67).to_hue will return a hash containing the integer values for the HUE color like {:hue=>33760, :saturation=>153, :luminance=>172}

hersha pushed a commit to hersha/hue that referenced this issue Aug 7, 2013
Implements Issue soffes#6

These classes allow you to generate the HUE color values from 3 different formats.
RGB.new(123,231,222).to_hue
HexRGB.new("7BD5DE").to_hue
HSL.new(185.45, 0.60, 0.67).to_hue
They each return a hash in the format of: {:hue=>33760, :saturation=>153, :luminance=>172}
sshao pushed a commit to sshao/hue that referenced this issue May 13, 2015
Implements Issue soffes#6

These classes allow you to generate the HUE color values from 3 different formats.
RGB.new(123,231,222).to_hue
HexRGB.new("7BD5DE").to_hue
HSL.new(185.45, 0.60, 0.67).to_hue
They each return a hash in the format of: {:hue=>33760, :saturation=>153, :luminance=>172}
@soffes
Copy link
Owner

soffes commented Jan 3, 2024

Hex was added in #54

@soffes soffes closed this as completed Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants