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

Forward fix for wide gamut changes in colors #10

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

gaaclarke
Copy link

@gaaclarke gaaclarke commented Aug 23, 2024

fixes #9

changes:

  • Renames ColorModel.withValues to ColorModel.fromValues
  • Renames LabColor.a to LabColor.chromaticityA
  • Renames LabColor.b to LabColor.chromaticityB
  • Renames OklabColor.a to OklabColor.chromaticityA
  • Renames OklabColor.b to OklabColor.chromaticityB
  • Adds Color.a, Color.r, Color.g, Color.b, Color.withValues, Color.colorSpace

I chose fromValues instead of withValues since "with*" is used to mean tweaking an existing color, whereas that method is creating completely new color.

@gaaclarke
Copy link
Author

friendly ping @james-alex @isaacroberts

@lukemmtt
Copy link

lukemmtt commented Dec 12, 2024

FYI, after upgrading my project to the new stable release Flutter 3.27.0, the underlying issue here resulted in build errors in my project. In my tests, @gaaclarke's PR here resolves these errors. Thus, this PR (or another similar fix) needs to be merged to resolve build incompatibilities between color_models and Flutter 3.27.0.

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

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

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.

color_models doesn't accommodate wide gamut adjustments to Flutter's Color
3 participants