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

Use Paper.Color instead of CSS color strings #927

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

adroitwhiz
Copy link
Contributor

@adroitwhiz adroitwhiz commented Nov 19, 2019

Resolves

Resolves #610

Proposed Changes

This PR changes the paint editor to consistently use Paper.Color objects to store color instead of CSS color strings.

Reason for Changes

This prevents unexpected side effects of HSV > RGB > HSV conversion, such as certain color channels being zeroed out when brightness or saturation are set to 0.

It also allows increased flexibility with regards to future color improvements, notably a "transparency" slider (#834).

Because this touches a huge portion of the codebase, I'd like to look over it with fresh eyes once some more time has passed. I'm submitting this as a draft in case you want to look over it too.

@adroitwhiz
Copy link
Contributor Author

The main concern I have with this is that Paper.Colors are not immutable. Paper does a "not quite cloning" operation when setting an object's color, but it behaves kind of strangely. See this sketch.

@adroitwhiz
Copy link
Contributor Author

#1004 also touches a lot of color-related code, so I'll probably go over this more thoroughly after that one's merged

@fsih fsih mentioned this pull request Jul 17, 2020
@LankyBox01
Copy link

look it over

@varunbiniwale varunbiniwale mentioned this pull request Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants