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

Merge V1.4.0 #8

Merged
merged 26 commits into from
Jul 2, 2023
Merged

Merge V1.4.0 #8

merged 26 commits into from
Jul 2, 2023

Conversation

rydmike
Copy link
Owner

@rydmike rydmike commented Jul 2, 2023

1.4.0

July 2, 2023

  • NEW FEATURES

    • Added support for new HCT tones used by updated Material3 color system, that were added during the first half of 2023 to the Material 3 color system specification. The added tones 4, 6, 12, 17, 22 are for new dark mode surfaces in revised Material 3 dark surface colors. Likewise, added tones 97, 96, 94, 92, 87 are for light mode surfaces in the updated Material 3 color system. For more information, see: https://m3.material.io/styles/color/the-color-system/color-roles.
      • The change and additions are none breaking. APIs that want and can use the extended tones can pass in an optional paletteType of FlexPaletteType and set it to FlexPaletteType.extended, by default its values FlexPaletteType.common resulting in the 15 tones [0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 95, 98, 99, 100] being produced as before.
      • The complete list of the 25 extended tones are [0, 4, 5, 6, 10, 12, 17, 20, 22, 30, 40, 50, 60, 70, 80, 87, 90, 92, 94, 95, 96, 97, 98, 99, 100].
      • None breaking Changed APIs that now support using paletteType of FlexPaletteTypeare:
        • FlexTonalPalette.of
        • FlexTonalPalette.fromList
        • FlexCorePalette.of
        • FlexCorePalette.fromHueChroma
        • FlexCorePalette.fromList
        • FlexCorePalette.fromSeeds
        • FlexTones
      • Flutter 3.10 and earlier do not yet use these new tones in its standard ColorScheme, but since they are in the Material 3 spec, they will arrive at some later point.
      • FlexTonalPalette, like MCU TonalPalette, caps chroma for tones higher than or equal to 90, to maximum chroma value of 40. In FlexTonalPalette this still applies when using FlexPaletteType.common, when you use the FlexPaletteType.extended, there is no chroma max cap on high tones, it uses fidelity mode for high tones. When using type FlexPaletteType.common the chroma of high tones (>= 90), is limited to maximum 40. This keeps the chromacity of tones 90 to 100, lower than 40. If the source uses has more chromacity than 40, there may be a sudden jump in chroma reduction at tone 90. This is the standard behavior for the original Material-3 tonal palette computation. The FlexPaletteType.common type is intended to be used when there is a need to follow strict M3's original palette design.
      • When using the FlexPaletteType.extended type tones, there are not only the new tones, but the chroma limit of tones >= 90 is also removed. This increases fidelity of higher tone when high chromacity is used.
    • Added two new pre-configured FlexToness, candyPop and chroma, they use the new FlexPaletteType.extended tonal palette.
    • Added new FlexTones modifier surfacesUseBW(). It can be used as a modifier to force any FlexTones seed strategy to use tone 100 (white) or tone 0 (black) as background and surface colors, depending on if they are dark or light
  • CHANGE

    • Minor style breaking: To correct and improve produced themes, the tones primaryContainerTone and secondaryContainerTone for light mode FlexTones.highContrast and FlexTones.ultraContrast were both changed from 95 to 90. This produces brighter and more punchy themes for these two high-contrast themes in light mode.
  • CHORE

    • Bump Dart SDK to >= 3.0.0 and Flutter SDK to >= 3.10.0. Fix lints for the bump.
    • Add all Material Color Utilities (MCU) updates from its Dart version to the internal bundled version.
      • This includes all PRs up to and including "PR: 28.6.2023 Change var back to double in Java." This equals Dart version 0.8.0 published on June 29, 2023, with its two new schemes fruit salad and rainbow.
      • At this time, Flutter master was using MCU version 0.5.0 and Flutter stable 3.10.0 still used the MCU version 0.2.0.
      • Since MCU is using zero semver and Flutter SDK, depends on it, any minor version number change is breaking and cannot be resolved across Flutter channels if a package also uses MCU. This is the reason why (FSS) for now does not use MCU directly. It bundles its own version of it for now. This also means FSS may sometimes use a newer version of MCU than Flutter stable, beta, and master. FSS may stop bundling MCU when it stops getting so many frequent breaking updates that cause dependency hell for a package that needs to depend on MCU and work on all Flutter channels.
  • EXAMPLE

    • Major refactoring of the example app.
    • Use a theme controller and ListenableBuilder to rebuild the app theme when the theme controller changes.
    • Feature: Add showing generated tonal palettes to the example.
    • Feature: Separate controls for making on Main and on Surface colors black and white.
    • Feature: Change seed colors in the app with Color picker.
    • Feature: Add switching between showing common tones and extended tones.
    • Feature: Add selecting a custom color as key color for error palette.

rydmike added 25 commits May 18, 2023 20:30
Separate classes FlexTonalPalette and FlexCorePalette to own files
Preparation step for more features in example app
ADD: Tone 97, extended size now 25
ADD: FlexTones.candyPop and FlexTones.chroma

Add and update: Tests
Refactor: Error color defaults logic (unbreaking, but nicer logic and always match defaults)

Change: candyPop and dark mode tones. this should be more popping and chromatic in dark mode.
Fix lints for Dart SDK and Flutter SDK bumps
@codecov
Copy link

codecov bot commented Jul 2, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (11add1f) 100.00% compared to head (8ee14e5) 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##            master        #8    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           35        39     +4     
  Lines         2303      2428   +125     
==========================================
+ Hits          2303      2428   +125     
Impacted Files Coverage Δ
lib/src/mcu/blend/blend.dart 100.00% <ø> (ø)
lib/src/mcu/hct/cam16.dart 100.00% <ø> (ø)
lib/src/mcu/hct/hct.dart 100.00% <ø> (ø)
lib/src/mcu/hct/src/hct_solver.dart 100.00% <ø> (ø)
lib/src/mcu/quantize/quantizer_wu.dart 100.00% <ø> (ø)
lib/src/mcu/scheme/dynamic_scheme.dart 100.00% <ø> (ø)
lib/src/mcu/temperature/temperature_cache.dart 100.00% <ø> (ø)
lib/src/flex/flex_core_palette.dart 100.00% <100.00%> (ø)
lib/src/flex/flex_seed_scheme.dart 100.00% <100.00%> (ø)
lib/src/flex/flex_tonal_palette.dart 100.00% <100.00%> (ø)
... and 12 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@rydmike rydmike merged commit cb1461a into master Jul 2, 2023
3 checks passed
@rydmike rydmike deleted the next-gen branch July 2, 2023 21:15
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.

1 participant