Skip to content

Fix color picker selecting below alpha bar#5702

Merged
dacap merged 2 commits into
aseprite:mainfrom
luke-henry-04:main
Mar 18, 2026
Merged

Fix color picker selecting below alpha bar#5702
dacap merged 2 commits into
aseprite:mainfrom
luke-henry-04:main

Conversation

@luke-henry-04

Copy link
Copy Markdown
Contributor

Fixes #2006

I added a check in the color selector, making sure the user can't select from below the alpha bar. The outside border of the ui elements are included in the widget, but the alpha bar and bottom bar bounds are contained strictly inside of the color selector's border. One check makes sure the user isn't selecting the boundary underneath of the alpha bar bounds, and the other prevents the eyedropper tool from previewing colors beneath the alpha bar.

This fixes the issue in the parent ColorSelector class rather than in each subclass individually, which also covers the RGB and RYB wheels not addressed in #2522

I agree that my contributions are licensed under the Individual Contributor License Agreement V4.0 ("CLA") as stated in https://github.com/igarastudio/cla/blob/main/cla.md
I have signed the CLA following the steps given in https://github.com/igarastudio/cla#signing

@luke-henry-04 luke-henry-04 requested a review from dacap as a code owner March 10, 2026 08:07
@dacap dacap self-assigned this Mar 10, 2026
@luke-henry-04

Copy link
Copy Markdown
Contributor Author

Found that when you click and drag the eyedropper from the primary or secondary color up towards the color selector from below, it sets the color to mask on the border, which then disables the alpha bar functionality until the mouse moves off of the alpha bar. This doesn't feel very clean, so I changed it to match the functionality of the other edges, which just extend the color picker values to the border.

Instead of returning the mask, it now selects from the lowest visible color selector bar (usually the alpha). This has the effect of the eyedropper appearing a few pixels out of bounds, although that mirrors the functionality of the other three edges.

@aseprite-bot

Copy link
Copy Markdown
Collaborator

clang-tidy review says "All clean, LGTM! 👍"

@dacap dacap added this to the v1.3.17.1 milestone Mar 18, 2026
@dacap

dacap commented Mar 18, 2026

Copy link
Copy Markdown
Member

Thanks for the patch @luke-henry-04 🙏 LGTM

@dacap dacap merged commit 61ccd14 into aseprite:main Mar 18, 2026
12 checks passed
@luke-henry-04 luke-henry-04 deleted the main branch March 18, 2026 23:17
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.

RGB zero values extend several pixels below alpha bar

3 participants