Skip to content

Conversation

@benthillerkus
Copy link
Contributor

@benthillerkus benthillerkus commented Apr 5, 2025

This pull request aligns the calculation of saturation for RGB to HSV conversion with the common formulas you find on the internet (concrete: if r, g and b are the same (-> gray), the saturation should be 0).

This fixes black currently having a saturation of 1 instead of 0.

fixes #166460

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added the framework flutter/packages/flutter repository. See also f: labels. label Apr 5, 2025
@benthillerkus benthillerkus changed the title fix: HSLColor.fromColor and HSVColor.fromColor HSLColor.fromColor and HSVColor.fromColor calculate saturation incorrectly Apr 5, 2025
@benthillerkus benthillerkus changed the title HSLColor.fromColor and HSVColor.fromColor calculate saturation incorrectly Change saturation calculation for HSLColor.fromColor and HSVColor.fromColor Apr 8, 2025
@benthillerkus benthillerkus changed the title Change saturation calculation for HSLColor.fromColor and HSVColor.fromColor Change saturation calculation for HSLColor.fromColor Apr 8, 2025
Copy link
Contributor

@dkwingsmt dkwingsmt left a comment

Choose a reason for hiding this comment

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

LGTM. Great tests, thank you!

Copy link
Contributor

@dkwingsmt dkwingsmt left a comment

Choose a reason for hiding this comment

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

I'll ask someone else who are more familiar with color spaces for a more thorough review.

Edit: He's currently OOO until Apr 14.

@dkwingsmt dkwingsmt self-requested a review April 9, 2025 16:53
@gaaclarke gaaclarke self-requested a review April 14, 2025 16:57
Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

The change looks goods. You confused me because the wikipedia article you linked to actually uses S = 0 if L = 1 or L = 0 but implemented S = if C = 0, these should be equivalent.

Just make the tests easier to debug.

String name,
)
in colors) {
// debugPrint('Testing color: $name');
Copy link
Member

Choose a reason for hiding this comment

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

Stray comment. Add the color name to the reason parameter for expect so some someone doesn't have to run the test through a debugger if it fails.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@gaaclarke
Copy link
Member

For future reference, the reason black's saturation was wrong is we'd get a division by zero that would get clamped to 1.

@benthillerkus benthillerkus requested a review from gaaclarke April 15, 2025 08:41
@gaaclarke
Copy link
Member

Thanks!

@benthillerkus
Copy link
Contributor Author

@gaaclarke can you add the auto submit label?

@gaaclarke
Copy link
Member

@gaaclarke can you add the auto submit label?

That's not going to help unfortunately until the tree is fixed and we rebase.

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 15, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Apr 15, 2025
Merged via the queue into flutter:master with commit 0bdad6f Apr 15, 2025
75 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 15, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Apr 16, 2025
Manual roll Flutter from 30e53b0 to db68c950c599 (98 revisions)

Manual roll requested by [email protected]

flutter/flutter@30e53b0...db68c95

2025-04-15 [email protected] [customer_testing] Pick up the fix for issue found by flutter/dart hh. (flutter/flutter#167212)
2025-04-15 [email protected] Roll Packages from f26b681 to 2fcc403 (4 revisions) (flutter/flutter#167218)
2025-04-15 [email protected] Fix: Update sheet route bottom padding with top padding (flutter/flutter#164473)
2025-04-15 [email protected] Add Irish(ga) to Flutter (flutter/flutter#167129)
2025-04-15 [email protected] Roll Fuchsia Linux SDK from 91RIHvX0YC3wzD7qj... to 7bWzHwIPBTyU6R9nO... (flutter/flutter#167213)
2025-04-15 [email protected] Change saturation calculation for HSLColor.fromColor (flutter/flutter#166639)
2025-04-15 [email protected] fix: Update time picker dialog input size (flutter/flutter#163184)
2025-04-15 [email protected] Clarify how/when `FLUTTER_PREBUILT_ENGINE_VERSION` is passed in Flutter's CI (flutter/flutter#167204)
2025-04-15 [email protected] [ Widget Preview ] Add support for `theme` and `brightness` properties on `Preview` (flutter/flutter#167001)
2025-04-15 [email protected] Update `tests.version` to fix `customer_testing`. (flutter/flutter#167206)
2025-04-15 [email protected] Persistent CupertinoListTile leading and trailing (flutter/flutter#166799)
2025-04-15 [email protected] Add buildroot compatibility for HWASAN. (flutter/flutter#167133)
2025-04-15 [email protected] Correct max height calculation to fade and animate insets on scroll in CupertinoSearchTextField (flutter/flutter#166569)
2025-04-15 [email protected] Clip bottom widgets in nav bar transition (flutter/flutter#166705)
2025-04-14 [email protected] Roll Skia from e7aa93f33a20 to 76cb5d4fba27 (13 revisions) (flutter/flutter#167132)
2025-04-14 [email protected] [fuchsia] Uprev test-scripts with FUCHSIA_READELF env (flutter/flutter#166929)
2025-04-14 [email protected] Cleanup links to flutter/engine in ci/builders docs (flutter/flutter#166916)
2025-04-14 [email protected] Roll Packages from 465bcff to f26b681 (1 revision) (flutter/flutter#167122)
2025-04-14 [email protected] [skwasm] Use `queueMicrotask` instead of `postMessage` when single-threaded (flutter/flutter#166997)
2025-04-14 [email protected] Remove some unused third party library build scripts (flutter/flutter#166960)
2025-04-14 [email protected] [reland] Fix regression in NDK version checking (flutter/flutter#167011)
2025-04-14 [email protected] Add network permissions information to the dart doc of network image.  (flutter/flutter#167110)
2025-04-14 [email protected] Include 3.29.3 and 3.29.2 changelog entries to master (flutter/flutter#166994)
2025-04-12 [email protected] [Impeller] various iOS cleanups. (flutter/flutter#166859)
2025-04-11 [email protected] [Impeller] reland: defer vulkan context initialization as long as possible. (flutter/flutter#167000)
2025-04-11 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Fix regression in NDK version checking (#166998)" (flutter/flutter#167007)
2025-04-11 [email protected] Fix regression in NDK version checking (flutter/flutter#166998)
2025-04-11 [email protected] [iOS] Infer autocorrect value from autofillHints (flutter/flutter#165637)
2025-04-11 [email protected] [Impeller] fix vulkan/gl color space decode. (flutter/flutter#166957)
2025-04-11 [email protected] modify toggle mode style with DatePickerTheme (flutter/flutter#164102)
2025-04-11 [email protected] [iOS/macOS] Add Xcode error if dev dependencies are incorrect (flutter/flutter#165916)
2025-04-11 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[Impeller] defer vulkan context initialization as long as possible. (#166941)" (flutter/flutter#166990)
2025-04-11 [email protected] Roll Packages from 431dc61 to 465bcff (2 revisions) (flutter/flutter#166982)
2025-04-11 [email protected] [Impeller] defer vulkan context initialization as long as possible. (flutter/flutter#166941)
2025-04-11 [email protected] Reland "[ Widget Preview ] Add initial support for communications over the Dart Tooling Daemon (DTD) (#166698)" (flutter/flutter#166877)
2025-04-11 [email protected] [native assets] Use workspace pubspec for user-defines (flutter/flutter#166977)
2025-04-11 [email protected] [native assets] Roll dependencies (flutter/flutter#166969)
2025-04-11 [email protected] Roll Skia from 98deb838d3b8 to e7aa93f33a20 (1 revision) (flutter/flutter#166966)
2025-04-11 [email protected] Roll Fuchsia Linux SDK from vYisSsIgqw0mqFRVJ... to 91RIHvX0YC3wzD7qj... (flutter/flutter#166963)
2025-04-11 [email protected] [native assets] Support user-defines in pubspec (flutter/flutter#166940)
2025-04-11 [email protected] [Impeller] correct render pass bariers when resolve has mips. (flutter/flutter#166892)
2025-04-11 [email protected] [Impeller] re-make AHB swapchain lazy and allow usage on < 34 (flutter/flutter#166943)
2025-04-11 [email protected] Reland "SliverEnsureSemantics (#165589)" (flutter/flutter#166889)
2025-04-11 [email protected] Roll Skia from 171b2bf1e496 to 98deb838d3b8 (2 revisions) (flutter/flutter#166955)
...
mboetger pushed a commit to mboetger/flutter that referenced this pull request Apr 16, 2025
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

This pull request aligns the calculation of saturation for RGB to HSV
conversion with the common formulas you find on the
[internet](https://en.wikipedia.org/wiki/HSL_and_HSV#Saturation)
(concrete: if `r`, `g` and `b` are the same (-> gray), the saturation
should be 0).

This fixes black currently having a saturation of `1` instead of `0`. 

fixes flutter#166460

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
ash2moon pushed a commit to ash2moon/flutter that referenced this pull request Apr 21, 2025
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

This pull request aligns the calculation of saturation for RGB to HSV
conversion with the common formulas you find on the
[internet](https://en.wikipedia.org/wiki/HSL_and_HSV#Saturation)
(concrete: if `r`, `g` and `b` are the same (-> gray), the saturation
should be 0).

This fixes black currently having a saturation of `1` instead of `0`. 

fixes flutter#166460

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
CodixNinja pushed a commit to CodixNinja/packages that referenced this pull request May 15, 2025
…(#9092)

Manual roll Flutter from 30e53b0d9caa to db68c950c599 (98 revisions)

Manual roll requested by [email protected]

flutter/flutter@30e53b0...db68c95

2025-04-15 [email protected] [customer_testing] Pick up the fix for issue found by flutter/dart hh. (flutter/flutter#167212)
2025-04-15 [email protected] Roll Packages from 853e96a to a5ed6cb (4 revisions) (flutter/flutter#167218)
2025-04-15 [email protected] Fix: Update sheet route bottom padding with top padding (flutter/flutter#164473)
2025-04-15 [email protected] Add Irish(ga) to Flutter (flutter/flutter#167129)
2025-04-15 [email protected] Roll Fuchsia Linux SDK from 91RIHvX0YC3wzD7qj... to 7bWzHwIPBTyU6R9nO... (flutter/flutter#167213)
2025-04-15 [email protected] Change saturation calculation for HSLColor.fromColor (flutter/flutter#166639)
2025-04-15 [email protected] fix: Update time picker dialog input size (flutter/flutter#163184)
2025-04-15 [email protected] Clarify how/when `FLUTTER_PREBUILT_ENGINE_VERSION` is passed in Flutter's CI (flutter/flutter#167204)
2025-04-15 [email protected] [ Widget Preview ] Add support for `theme` and `brightness` properties on `Preview` (flutter/flutter#167001)
2025-04-15 [email protected] Update `tests.version` to fix `customer_testing`. (flutter/flutter#167206)
2025-04-15 [email protected] Persistent CupertinoListTile leading and trailing (flutter/flutter#166799)
2025-04-15 [email protected] Add buildroot compatibility for HWASAN. (flutter/flutter#167133)
2025-04-15 [email protected] Correct max height calculation to fade and animate insets on scroll in CupertinoSearchTextField (flutter/flutter#166569)
2025-04-15 [email protected] Clip bottom widgets in nav bar transition (flutter/flutter#166705)
2025-04-14 [email protected] Roll Skia from e7aa93f33a20 to 76cb5d4fba27 (13 revisions) (flutter/flutter#167132)
2025-04-14 [email protected] [fuchsia] Uprev test-scripts with FUCHSIA_READELF env (flutter/flutter#166929)
2025-04-14 [email protected] Cleanup links to flutter/engine in ci/builders docs (flutter/flutter#166916)
2025-04-14 [email protected] Roll Packages from 4808eff to 853e96a (1 revision) (flutter/flutter#167122)
2025-04-14 [email protected] [skwasm] Use `queueMicrotask` instead of `postMessage` when single-threaded (flutter/flutter#166997)
2025-04-14 [email protected] Remove some unused third party library build scripts (flutter/flutter#166960)
2025-04-14 [email protected] [reland] Fix regression in NDK version checking (flutter/flutter#167011)
2025-04-14 [email protected] Add network permissions information to the dart doc of network image.  (flutter/flutter#167110)
2025-04-14 [email protected] Include 3.29.3 and 3.29.2 changelog entries to master (flutter/flutter#166994)
2025-04-12 [email protected] [Impeller] various iOS cleanups. (flutter/flutter#166859)
2025-04-11 [email protected] [Impeller] reland: defer vulkan context initialization as long as possible. (flutter/flutter#167000)
2025-04-11 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Fix regression in NDK version checking (#166998)" (flutter/flutter#167007)
2025-04-11 [email protected] Fix regression in NDK version checking (flutter/flutter#166998)
2025-04-11 [email protected] [iOS] Infer autocorrect value from autofillHints (flutter/flutter#165637)
2025-04-11 [email protected] [Impeller] fix vulkan/gl color space decode. (flutter/flutter#166957)
2025-04-11 [email protected] modify toggle mode style with DatePickerTheme (flutter/flutter#164102)
2025-04-11 [email protected] [iOS/macOS] Add Xcode error if dev dependencies are incorrect (flutter/flutter#165916)
2025-04-11 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[Impeller] defer vulkan context initialization as long as possible. (#166941)" (flutter/flutter#166990)
2025-04-11 [email protected] Roll Packages from b2c45f9 to 4808eff (2 revisions) (flutter/flutter#166982)
2025-04-11 [email protected] [Impeller] defer vulkan context initialization as long as possible. (flutter/flutter#166941)
2025-04-11 [email protected] Reland "[ Widget Preview ] Add initial support for communications over the Dart Tooling Daemon (DTD) (#166698)" (flutter/flutter#166877)
2025-04-11 [email protected] [native assets] Use workspace pubspec for user-defines (flutter/flutter#166977)
2025-04-11 [email protected] [native assets] Roll dependencies (flutter/flutter#166969)
2025-04-11 [email protected] Roll Skia from 98deb838d3b8 to e7aa93f33a20 (1 revision) (flutter/flutter#166966)
2025-04-11 [email protected] Roll Fuchsia Linux SDK from vYisSsIgqw0mqFRVJ... to 91RIHvX0YC3wzD7qj... (flutter/flutter#166963)
2025-04-11 [email protected] [native assets] Support user-defines in pubspec (flutter/flutter#166940)
2025-04-11 [email protected] [Impeller] correct render pass bariers when resolve has mips. (flutter/flutter#166892)
2025-04-11 [email protected] [Impeller] re-make AHB swapchain lazy and allow usage on < 34 (flutter/flutter#166943)
2025-04-11 [email protected] Reland "SliverEnsureSemantics (#165589)" (flutter/flutter#166889)
2025-04-11 [email protected] Roll Skia from 171b2bf1e496 to 98deb838d3b8 (2 revisions) (flutter/flutter#166955)
...
androidseb pushed a commit to androidseb/packages that referenced this pull request Jun 8, 2025
…ter#9092)

Manual roll Flutter from 30e53b0 to db68c950c599 (98 revisions)

Manual roll requested by [email protected]

flutter/flutter@30e53b0...db68c95

2025-04-15 [email protected] [customer_testing] Pick up the fix for issue found by flutter/dart hh. (flutter/flutter#167212)
2025-04-15 [email protected] Roll Packages from f26b681 to 2fcc403 (4 revisions) (flutter/flutter#167218)
2025-04-15 [email protected] Fix: Update sheet route bottom padding with top padding (flutter/flutter#164473)
2025-04-15 [email protected] Add Irish(ga) to Flutter (flutter/flutter#167129)
2025-04-15 [email protected] Roll Fuchsia Linux SDK from 91RIHvX0YC3wzD7qj... to 7bWzHwIPBTyU6R9nO... (flutter/flutter#167213)
2025-04-15 [email protected] Change saturation calculation for HSLColor.fromColor (flutter/flutter#166639)
2025-04-15 [email protected] fix: Update time picker dialog input size (flutter/flutter#163184)
2025-04-15 [email protected] Clarify how/when `FLUTTER_PREBUILT_ENGINE_VERSION` is passed in Flutter's CI (flutter/flutter#167204)
2025-04-15 [email protected] [ Widget Preview ] Add support for `theme` and `brightness` properties on `Preview` (flutter/flutter#167001)
2025-04-15 [email protected] Update `tests.version` to fix `customer_testing`. (flutter/flutter#167206)
2025-04-15 [email protected] Persistent CupertinoListTile leading and trailing (flutter/flutter#166799)
2025-04-15 [email protected] Add buildroot compatibility for HWASAN. (flutter/flutter#167133)
2025-04-15 [email protected] Correct max height calculation to fade and animate insets on scroll in CupertinoSearchTextField (flutter/flutter#166569)
2025-04-15 [email protected] Clip bottom widgets in nav bar transition (flutter/flutter#166705)
2025-04-14 [email protected] Roll Skia from e7aa93f33a20 to 76cb5d4fba27 (13 revisions) (flutter/flutter#167132)
2025-04-14 [email protected] [fuchsia] Uprev test-scripts with FUCHSIA_READELF env (flutter/flutter#166929)
2025-04-14 [email protected] Cleanup links to flutter/engine in ci/builders docs (flutter/flutter#166916)
2025-04-14 [email protected] Roll Packages from 465bcff to f26b681 (1 revision) (flutter/flutter#167122)
2025-04-14 [email protected] [skwasm] Use `queueMicrotask` instead of `postMessage` when single-threaded (flutter/flutter#166997)
2025-04-14 [email protected] Remove some unused third party library build scripts (flutter/flutter#166960)
2025-04-14 [email protected] [reland] Fix regression in NDK version checking (flutter/flutter#167011)
2025-04-14 [email protected] Add network permissions information to the dart doc of network image.  (flutter/flutter#167110)
2025-04-14 [email protected] Include 3.29.3 and 3.29.2 changelog entries to master (flutter/flutter#166994)
2025-04-12 [email protected] [Impeller] various iOS cleanups. (flutter/flutter#166859)
2025-04-11 [email protected] [Impeller] reland: defer vulkan context initialization as long as possible. (flutter/flutter#167000)
2025-04-11 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Fix regression in NDK version checking (#166998)" (flutter/flutter#167007)
2025-04-11 [email protected] Fix regression in NDK version checking (flutter/flutter#166998)
2025-04-11 [email protected] [iOS] Infer autocorrect value from autofillHints (flutter/flutter#165637)
2025-04-11 [email protected] [Impeller] fix vulkan/gl color space decode. (flutter/flutter#166957)
2025-04-11 [email protected] modify toggle mode style with DatePickerTheme (flutter/flutter#164102)
2025-04-11 [email protected] [iOS/macOS] Add Xcode error if dev dependencies are incorrect (flutter/flutter#165916)
2025-04-11 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[Impeller] defer vulkan context initialization as long as possible. (#166941)" (flutter/flutter#166990)
2025-04-11 [email protected] Roll Packages from 431dc61 to 465bcff (2 revisions) (flutter/flutter#166982)
2025-04-11 [email protected] [Impeller] defer vulkan context initialization as long as possible. (flutter/flutter#166941)
2025-04-11 [email protected] Reland "[ Widget Preview ] Add initial support for communications over the Dart Tooling Daemon (DTD) (#166698)" (flutter/flutter#166877)
2025-04-11 [email protected] [native assets] Use workspace pubspec for user-defines (flutter/flutter#166977)
2025-04-11 [email protected] [native assets] Roll dependencies (flutter/flutter#166969)
2025-04-11 [email protected] Roll Skia from 98deb838d3b8 to e7aa93f33a20 (1 revision) (flutter/flutter#166966)
2025-04-11 [email protected] Roll Fuchsia Linux SDK from vYisSsIgqw0mqFRVJ... to 91RIHvX0YC3wzD7qj... (flutter/flutter#166963)
2025-04-11 [email protected] [native assets] Support user-defines in pubspec (flutter/flutter#166940)
2025-04-11 [email protected] [Impeller] correct render pass bariers when resolve has mips. (flutter/flutter#166892)
2025-04-11 [email protected] [Impeller] re-make AHB swapchain lazy and allow usage on < 34 (flutter/flutter#166943)
2025-04-11 [email protected] Reland "SliverEnsureSemantics (#165589)" (flutter/flutter#166889)
2025-04-11 [email protected] Roll Skia from 171b2bf1e496 to 98deb838d3b8 (2 revisions) (flutter/flutter#166955)
...
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
…ter#9092)

Manual roll Flutter from 30e53b0 to db68c950c599 (98 revisions)

Manual roll requested by [email protected]

flutter/flutter@30e53b0...db68c95

2025-04-15 [email protected] [customer_testing] Pick up the fix for issue found by flutter/dart hh. (flutter/flutter#167212)
2025-04-15 [email protected] Roll Packages from f26b681 to 2fcc403 (4 revisions) (flutter/flutter#167218)
2025-04-15 [email protected] Fix: Update sheet route bottom padding with top padding (flutter/flutter#164473)
2025-04-15 [email protected] Add Irish(ga) to Flutter (flutter/flutter#167129)
2025-04-15 [email protected] Roll Fuchsia Linux SDK from 91RIHvX0YC3wzD7qj... to 7bWzHwIPBTyU6R9nO... (flutter/flutter#167213)
2025-04-15 [email protected] Change saturation calculation for HSLColor.fromColor (flutter/flutter#166639)
2025-04-15 [email protected] fix: Update time picker dialog input size (flutter/flutter#163184)
2025-04-15 [email protected] Clarify how/when `FLUTTER_PREBUILT_ENGINE_VERSION` is passed in Flutter's CI (flutter/flutter#167204)
2025-04-15 [email protected] [ Widget Preview ] Add support for `theme` and `brightness` properties on `Preview` (flutter/flutter#167001)
2025-04-15 [email protected] Update `tests.version` to fix `customer_testing`. (flutter/flutter#167206)
2025-04-15 [email protected] Persistent CupertinoListTile leading and trailing (flutter/flutter#166799)
2025-04-15 [email protected] Add buildroot compatibility for HWASAN. (flutter/flutter#167133)
2025-04-15 [email protected] Correct max height calculation to fade and animate insets on scroll in CupertinoSearchTextField (flutter/flutter#166569)
2025-04-15 [email protected] Clip bottom widgets in nav bar transition (flutter/flutter#166705)
2025-04-14 [email protected] Roll Skia from e7aa93f33a20 to 76cb5d4fba27 (13 revisions) (flutter/flutter#167132)
2025-04-14 [email protected] [fuchsia] Uprev test-scripts with FUCHSIA_READELF env (flutter/flutter#166929)
2025-04-14 [email protected] Cleanup links to flutter/engine in ci/builders docs (flutter/flutter#166916)
2025-04-14 [email protected] Roll Packages from 465bcff to f26b681 (1 revision) (flutter/flutter#167122)
2025-04-14 [email protected] [skwasm] Use `queueMicrotask` instead of `postMessage` when single-threaded (flutter/flutter#166997)
2025-04-14 [email protected] Remove some unused third party library build scripts (flutter/flutter#166960)
2025-04-14 [email protected] [reland] Fix regression in NDK version checking (flutter/flutter#167011)
2025-04-14 [email protected] Add network permissions information to the dart doc of network image.  (flutter/flutter#167110)
2025-04-14 [email protected] Include 3.29.3 and 3.29.2 changelog entries to master (flutter/flutter#166994)
2025-04-12 [email protected] [Impeller] various iOS cleanups. (flutter/flutter#166859)
2025-04-11 [email protected] [Impeller] reland: defer vulkan context initialization as long as possible. (flutter/flutter#167000)
2025-04-11 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Fix regression in NDK version checking (#166998)" (flutter/flutter#167007)
2025-04-11 [email protected] Fix regression in NDK version checking (flutter/flutter#166998)
2025-04-11 [email protected] [iOS] Infer autocorrect value from autofillHints (flutter/flutter#165637)
2025-04-11 [email protected] [Impeller] fix vulkan/gl color space decode. (flutter/flutter#166957)
2025-04-11 [email protected] modify toggle mode style with DatePickerTheme (flutter/flutter#164102)
2025-04-11 [email protected] [iOS/macOS] Add Xcode error if dev dependencies are incorrect (flutter/flutter#165916)
2025-04-11 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[Impeller] defer vulkan context initialization as long as possible. (#166941)" (flutter/flutter#166990)
2025-04-11 [email protected] Roll Packages from 431dc61 to 465bcff (2 revisions) (flutter/flutter#166982)
2025-04-11 [email protected] [Impeller] defer vulkan context initialization as long as possible. (flutter/flutter#166941)
2025-04-11 [email protected] Reland "[ Widget Preview ] Add initial support for communications over the Dart Tooling Daemon (DTD) (#166698)" (flutter/flutter#166877)
2025-04-11 [email protected] [native assets] Use workspace pubspec for user-defines (flutter/flutter#166977)
2025-04-11 [email protected] [native assets] Roll dependencies (flutter/flutter#166969)
2025-04-11 [email protected] Roll Skia from 98deb838d3b8 to e7aa93f33a20 (1 revision) (flutter/flutter#166966)
2025-04-11 [email protected] Roll Fuchsia Linux SDK from vYisSsIgqw0mqFRVJ... to 91RIHvX0YC3wzD7qj... (flutter/flutter#166963)
2025-04-11 [email protected] [native assets] Support user-defines in pubspec (flutter/flutter#166940)
2025-04-11 [email protected] [Impeller] correct render pass bariers when resolve has mips. (flutter/flutter#166892)
2025-04-11 [email protected] [Impeller] re-make AHB swapchain lazy and allow usage on < 34 (flutter/flutter#166943)
2025-04-11 [email protected] Reland "SliverEnsureSemantics (#165589)" (flutter/flutter#166889)
2025-04-11 [email protected] Roll Skia from 171b2bf1e496 to 98deb838d3b8 (2 revisions) (flutter/flutter#166955)
...
Ortes pushed a commit to Ortes/packages that referenced this pull request Jun 25, 2025
…ter#9092)

Manual roll Flutter from 30e53b0 to db68c950c599 (98 revisions)

Manual roll requested by [email protected]

flutter/flutter@30e53b0...db68c95

2025-04-15 [email protected] [customer_testing] Pick up the fix for issue found by flutter/dart hh. (flutter/flutter#167212)
2025-04-15 [email protected] Roll Packages from f26b681 to 2fcc403 (4 revisions) (flutter/flutter#167218)
2025-04-15 [email protected] Fix: Update sheet route bottom padding with top padding (flutter/flutter#164473)
2025-04-15 [email protected] Add Irish(ga) to Flutter (flutter/flutter#167129)
2025-04-15 [email protected] Roll Fuchsia Linux SDK from 91RIHvX0YC3wzD7qj... to 7bWzHwIPBTyU6R9nO... (flutter/flutter#167213)
2025-04-15 [email protected] Change saturation calculation for HSLColor.fromColor (flutter/flutter#166639)
2025-04-15 [email protected] fix: Update time picker dialog input size (flutter/flutter#163184)
2025-04-15 [email protected] Clarify how/when `FLUTTER_PREBUILT_ENGINE_VERSION` is passed in Flutter's CI (flutter/flutter#167204)
2025-04-15 [email protected] [ Widget Preview ] Add support for `theme` and `brightness` properties on `Preview` (flutter/flutter#167001)
2025-04-15 [email protected] Update `tests.version` to fix `customer_testing`. (flutter/flutter#167206)
2025-04-15 [email protected] Persistent CupertinoListTile leading and trailing (flutter/flutter#166799)
2025-04-15 [email protected] Add buildroot compatibility for HWASAN. (flutter/flutter#167133)
2025-04-15 [email protected] Correct max height calculation to fade and animate insets on scroll in CupertinoSearchTextField (flutter/flutter#166569)
2025-04-15 [email protected] Clip bottom widgets in nav bar transition (flutter/flutter#166705)
2025-04-14 [email protected] Roll Skia from e7aa93f33a20 to 76cb5d4fba27 (13 revisions) (flutter/flutter#167132)
2025-04-14 [email protected] [fuchsia] Uprev test-scripts with FUCHSIA_READELF env (flutter/flutter#166929)
2025-04-14 [email protected] Cleanup links to flutter/engine in ci/builders docs (flutter/flutter#166916)
2025-04-14 [email protected] Roll Packages from 465bcff to f26b681 (1 revision) (flutter/flutter#167122)
2025-04-14 [email protected] [skwasm] Use `queueMicrotask` instead of `postMessage` when single-threaded (flutter/flutter#166997)
2025-04-14 [email protected] Remove some unused third party library build scripts (flutter/flutter#166960)
2025-04-14 [email protected] [reland] Fix regression in NDK version checking (flutter/flutter#167011)
2025-04-14 [email protected] Add network permissions information to the dart doc of network image.  (flutter/flutter#167110)
2025-04-14 [email protected] Include 3.29.3 and 3.29.2 changelog entries to master (flutter/flutter#166994)
2025-04-12 [email protected] [Impeller] various iOS cleanups. (flutter/flutter#166859)
2025-04-11 [email protected] [Impeller] reland: defer vulkan context initialization as long as possible. (flutter/flutter#167000)
2025-04-11 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Fix regression in NDK version checking (#166998)" (flutter/flutter#167007)
2025-04-11 [email protected] Fix regression in NDK version checking (flutter/flutter#166998)
2025-04-11 [email protected] [iOS] Infer autocorrect value from autofillHints (flutter/flutter#165637)
2025-04-11 [email protected] [Impeller] fix vulkan/gl color space decode. (flutter/flutter#166957)
2025-04-11 [email protected] modify toggle mode style with DatePickerTheme (flutter/flutter#164102)
2025-04-11 [email protected] [iOS/macOS] Add Xcode error if dev dependencies are incorrect (flutter/flutter#165916)
2025-04-11 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[Impeller] defer vulkan context initialization as long as possible. (#166941)" (flutter/flutter#166990)
2025-04-11 [email protected] Roll Packages from 431dc61 to 465bcff (2 revisions) (flutter/flutter#166982)
2025-04-11 [email protected] [Impeller] defer vulkan context initialization as long as possible. (flutter/flutter#166941)
2025-04-11 [email protected] Reland "[ Widget Preview ] Add initial support for communications over the Dart Tooling Daemon (DTD) (#166698)" (flutter/flutter#166877)
2025-04-11 [email protected] [native assets] Use workspace pubspec for user-defines (flutter/flutter#166977)
2025-04-11 [email protected] [native assets] Roll dependencies (flutter/flutter#166969)
2025-04-11 [email protected] Roll Skia from 98deb838d3b8 to e7aa93f33a20 (1 revision) (flutter/flutter#166966)
2025-04-11 [email protected] Roll Fuchsia Linux SDK from vYisSsIgqw0mqFRVJ... to 91RIHvX0YC3wzD7qj... (flutter/flutter#166963)
2025-04-11 [email protected] [native assets] Support user-defines in pubspec (flutter/flutter#166940)
2025-04-11 [email protected] [Impeller] correct render pass bariers when resolve has mips. (flutter/flutter#166892)
2025-04-11 [email protected] [Impeller] re-make AHB swapchain lazy and allow usage on < 34 (flutter/flutter#166943)
2025-04-11 [email protected] Reland "SliverEnsureSemantics (#165589)" (flutter/flutter#166889)
2025-04-11 [email protected] Roll Skia from 171b2bf1e496 to 98deb838d3b8 (2 revisions) (flutter/flutter#166955)
...
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
romanejaquez pushed a commit to romanejaquez/flutter that referenced this pull request Aug 14, 2025
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

This pull request aligns the calculation of saturation for RGB to HSV
conversion with the common formulas you find on the
[internet](https://en.wikipedia.org/wiki/HSL_and_HSV#Saturation)
(concrete: if `r`, `g` and `b` are the same (-> gray), the saturation
should be 0).

This fixes black currently having a saturation of `1` instead of `0`. 

fixes flutter#166460

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HSLColor.fromColor treats black as fully saturated

3 participants