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

color_models doesn't accommodate wide gamut adjustments to Flutter's Color #9

Open
gaaclarke opened this issue Aug 23, 2024 · 1 comment · May be fixed by #10
Open

color_models doesn't accommodate wide gamut adjustments to Flutter's Color #9

gaaclarke opened this issue Aug 23, 2024 · 1 comment · May be fixed by #10

Comments

@gaaclarke
Copy link

gaaclarke commented Aug 23, 2024

Hi @james-alex, the Color class is changing in Flutter and this package is blocking that change. There are new floating point accessors coming in.

You can see the design doc here: https://docs.google.com/document/d/1JaJg34uB7bVssr3oyS-QLe2FlZHUIHcR6aG83JlKwak/edit
You can also see the PR that got reverted since it broke this package: flutter/engine#54737
Here is the related issue: flutter/flutter#127855

I'll queue up a change for you. You can reach me on discord (name gaaclarke) if you want to reach out on chat.

@gaaclarke gaaclarke linked a pull request Aug 23, 2024 that will close this issue
@gaaclarke gaaclarke changed the title color_models doesn't accommodate wide gamut adjustments to color color_models doesn't accommodate wide gamut adjustments to Flutter's Color Aug 23, 2024
@lukemmtt
Copy link

lukemmtt commented Dec 12, 2024

FYI, after upgrading my project to the new stable release Flutter 3.27.0, this issue resulted in build errors—thus, a new release of color_models & flutter_color_models (incorporating #10 or similar) is needed for compatibility going forward.

In case it might help anyone in the meantime, I resolved my project's build errors with a dependency override pointing to the fixes proposed in this PR (but substituting with my own fork):

dependencies:
  color_models:
    git:
      url: https://github.com/gaaclarke/color_models.git
      ref: wide-gamut
      path: color_models
  flutter_color_models:
    git:
      url: https://github.com/gaaclarke/color_models.git
      ref: wide-gamut
      path: flutter_color_models
      
dependency_overrides:
  color_models:
    git:
      url: https://github.com/gaaclarke/color_models.git
      ref: wide-gamut
      path: color_models
  flutter_color_models:
    git:
      url: https://github.com/gaaclarke/color_models.git
      ref: wide-gamut
      path: flutter_color_models

Thank you @gaaclarke for the fixes 🙏🏻

timmaffett added a commit to timmaffett/color_models that referenced this issue Jan 8, 2025
Support Flutter 3.x wide gamut changes, Fix okLab<->RGB conversions (gamma correction math was swapped), Fixes james-alex#9, Fixes james-alex#6
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 a pull request may close this issue.

2 participants