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

Fix CMYK output on black #69

Merged
merged 1 commit into from
Apr 11, 2024
Merged

Fix CMYK output on black #69

merged 1 commit into from
Apr 11, 2024

Conversation

felixdorn
Copy link
Contributor

@felixdorn felixdorn commented Apr 11, 2024

Reproduce:

hyprpicker --no-fancy --format cmyk 
  • Click in the black circle
  • Observe:
-nan% -nan% -nan% 0%

Fix:

The current implementation does not handle the case where K = 0, which causes a divide by zero error when computing c, m, y which are of the form [expr] / K.

In this case, setting K = 1 is a correct way to handle this edge case.

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks :)

@vaxerski vaxerski merged commit be7a0e8 into hyprwm:main Apr 11, 2024
1 check passed
@felixdorn felixdorn deleted the fix-cmyk branch April 12, 2024 00:52
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.

2 participants