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 HSLA interpolation, add HSLA <-> RGBA animations #1332

Merged
merged 4 commits into from Nov 3, 2021
Merged

Conversation

mattgperry
Copy link
Collaborator

Fixes: #1324

This converts HSLA values to RGBA before animation to move interpolation to linear space, same as RGB. Doing so also enables HSLA <-> RGBA/Hex color interpolation

@mattgperry mattgperry requested a review from nvh November 3, 2021 14:09
@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 3, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 3973ea7:

Sandbox Source
Framer Motion: Simple animation Configuration
App Store UI using React and Framer Motion Configuration
Framer Motion: Reorder animation Configuration
Framer Motion: growing item positionTransition issue Configuration
Framer Motion: Image lightbox Configuration
Framer Motion: Gesture animations (forked) Issue #1324
Framer Motion: Gesture animations (forked) Issue #1324

Copy link
Contributor

@nvh nvh left a comment

Choose a reason for hiding this comment

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

So is the actual fix upstream in popmotion?

@@ -160,7 +160,7 @@
},
{
"path": "./dist/size-webpack-dom-max.js",
"maxSize": "30.3 kB"
"maxSize": "30.4 kB"
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't these be less tight so that they do not change all the time?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not so fussed, they're there to be quite strict. It's big enough now that it's easy to forgive what are significant movements, absolutely speaking.

@mattgperry
Copy link
Collaborator Author

So is the actual fix upstream in popmotion?

Yeah specifically Popmotion/popmotion@984db89#diff-2b1f8a062fc26f97d539616cb4c033d4b05e5654cff599c8e57e4baa6ed8a375L22

@mattgperry mattgperry added the automerge Land this PR label Nov 3, 2021
@mergetron mergetron bot merged commit 28412af into main Nov 3, 2021
@mergetron mergetron bot deleted the fix/hsla-rgba branch November 3, 2021 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Land this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] HSLA colors sometimes transition incorrectly
2 participants