Skip to content

Brightness example: Fix maximum value for brightness #777

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

Merged
merged 1 commit into from
Nov 4, 2019

Conversation

bclausdorff
Copy link
Contributor

Issue
The colors in the color brightness example always seem to be rather dark. Even when moving the cursor to the lowest position possible.

Reason
The maximum value for brightness is being set to the width of the canvas. As mouseY is being used as the brightness of the color and the height of the canvas is much lower than the width, it is impossible to reach full brightness for a bar.

Fix
This can be fixed by setting the maximum value for brightness to the height of the canvas.

@REAS REAS merged commit b9b3456 into processing:master Nov 4, 2019
@REAS
Copy link
Member

REAS commented Nov 4, 2019

Thank you!

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