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 gem expects 6 character hex string #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mrloop
Copy link

@mrloop mrloop commented Jan 6, 2017

Similar to #32 but deals with unwanted alpha channel info on osx.

The color gem expects hex color string with 3 or 6 digits, see:
https://github.com/halostatue/color/blob/2159ca233851ca3304414b831d9da368dcbafb04/lib/color/rgb.rb#L609

When miro generates a histogram it uses Color::RGB.from_html however
image magick can generate 8 character hex string on osx where the image
contains an alpha channel.
Using these and from_html raises an error.

The PR tell image magick we want to discard the alpha channel info color strings

The color gem expects hex color string with 3 or 6 digits, see:
https://github.com/halostatue/color/blob/2159ca233851ca3304414b831d9da368dcbafb04/lib/color/rgb.rb#L609

When miro generates a histogram it uses `Color::RGB.from_html` however
image magick can generate 8 character hex string on osx where the image
contains an alpha channel.
Using these and `from_html` raises an error.

The PR tell image magick we want to discard the alpha channel info color strings
@mrloop mrloop mentioned this pull request Jan 6, 2017
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

Successfully merging this pull request may close these issues.

1 participant