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

Inconsistency between dart and typescript schemes #162

Open
Harm-Nullix opened this issue Sep 11, 2024 · 1 comment
Open

Inconsistency between dart and typescript schemes #162

Harm-Nullix opened this issue Sep 11, 2024 · 1 comment

Comments

@Harm-Nullix
Copy link

Harm-Nullix commented Sep 11, 2024

I compared the dart dynamic schemes with different contrasts against each other. They differ a lot.

Starting with the "seed" which is a argbFromHex output from the primary color in the "coreColors" section.
Why is this so much bigger/different.

Because of this, it does not feel reliable using this library.
The diff:
https://www.diffchecker.com/qxi77dR4/

LEFT IS DART, RIGHT IS TS

Some colors on background and stuff are different.
I did not do much,

// create core pallet
  final CorePalette corePalette = CorePalette.of(argb);

// add dynamic scheme for all 
 dynamicSchemes.add(DynamicScheme(
            sourceColorArgb: argb,
            contrastLevel: contrast,
            variant: Variant.values[name.index],
            isDark: isDark,
            primaryPalette: corePalette.primary,
            secondaryPalette: corePalette.secondary,
            tertiaryPalette: corePalette.tertiary,
            neutralPalette: corePalette.neutral,
            neutralVariantPalette: corePalette.neutralVariant));
      }

// got output as hex from
StringUtils.hexFromArgb(scheme.background)

StringUtils work differently in both packages, that is clear from the source.
Maybe here lies the output difference as well?

@Harm-Nullix
Copy link
Author

Tried it without string utils classes, still give differnt output

(https://www.diffchecker.com/l98hFVn5/)[https://www.diffchecker.com/l98hFVn5/]

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

No branches or pull requests

1 participant