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

[M3] Diff tone 90 color value between material_color_utilities and Material builder #132730

Closed
khanhnt748 opened this issue Aug 17, 2023 · 2 comments
Labels
r: invalid Issue is closed as not valid

Comments

@khanhnt748
Copy link

#91605

We try to generate tonal palette with primary color Color(0xFF14C560):

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:material_color_utilities/material_color_utilities.dart';

void main() {
  const primaryColor = Color(0xFF14C560);
  group('emerald', () {
    group('primary', () {
      final toneGroups = <int, Color>{
        10: const Color(0xFF00210A),
        20: const Color(0xFF003916),
        30: const Color(0xFF005323),
        40: const Color(0xFF006D31),
        50: const Color(0xFF008A40),
        60: const Color(0xFF00A74F),
        70: const Color(0xFF13C560),
        80: const Color(0xFF44E178),
        90: const Color(0xFF66FF92),
        95: const Color(0xFFC5FFCA),
        99: const Color(0xFFF6FFF2),
        100: const Color(0xFFFFFFFF),
      };
      final corePalette = CorePalette.of(primaryColor.value);
      final tonalPalette = corePalette.primary;
      for (final toneGroup in toneGroups.entries) {
        final tone = toneGroup.key;
        final color = toneGroup.value;
        final actualColorValue = tonalPalette.get(tone);
        final actualColor = Color(actualColorValue);
        test('tone $tone color $color actualColor $actualColor', () {
          expect(actualColorValue, color.value);
        });
      }
    });
  });
}

Test result:

00:01 +8 -1: emerald primary tone 90 color Color(0xff66ff92) actualColor Color(0xffaff3b7) [E]
  Expected: <4284940178>
    Actual: <4289721271>
  
  package:matcher                                     expect
  package:flutter_test/src/widget_tester.dart 459:16  expect
  test/theme/emerald.dart 31:11                       main.<fn>.<fn>.<fn>
@danagbemava-nc danagbemava-nc added the in triage Presently being triaged by the triage team label Aug 17, 2023
@danagbemava-nc
Copy link
Member

Hi @khanhnt748, none of these two tools are maintained in the flutter repo. Kindly file an issue on their dedicated github repos so that they can be looked at. I think the material_color_utilities repo might be the best place to report this.

I'll be closing this as these tools are from the material team not the flutter team.

Thank you

@danagbemava-nc danagbemava-nc closed this as not planned Won't fix, can't repro, duplicate, stale Aug 17, 2023
@danagbemava-nc danagbemava-nc added r: invalid Issue is closed as not valid and removed in triage Presently being triaged by the triage team labels Aug 17, 2023
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
r: invalid Issue is closed as not valid
Projects
None yet
Development

No branches or pull requests

2 participants