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

Color difference between avatars generated on mobile and desktop #394

Closed
sbermingham93 opened this issue Dec 18, 2023 · 7 comments
Closed
Assignees

Comments

@sbermingham93
Copy link

We are using @dicebear/core, and @dicebear/collection version ^7.0.1 for both

import { createAvatar } from "@dicebear/core";
import { botttsNeutral } from "@dicebear/collection";

...

const avatar = createAvatar(botttsNeutral, {
seed: walletPubkey?.toString(),
});

return avatar.toString();

...

For the same seed we are seeing different colors when rendered on mobile device and desktop device, both on chrome. (see both attached
Screenshot 2023-12-18 at 18 11 41
)

image0 (1)

Presumably this is not as expected?

@sbermingham93
Copy link
Author

Also meant to say, thank you, your libraries are great, much appreciated!

@FlorianKoerner FlorianKoerner transferred this issue from dicebear/api Dec 18, 2023
@FlorianKoerner
Copy link
Member

FlorianKoerner commented Dec 18, 2023

Hi @sbermingham93

Of course, there should be no differences. To help you better and to be able to reproduce the problem, I need the exact seed and other options that are used in your example. The operating system and browser version would also be helpful.

@sbermingham93
Copy link
Author

Hi, thank you for the reply.

The seed is: FViCMckurWzJok4mui4LBf9SQGAZnTsX9A1SppXDAnGm.

Desktop device is Macbook Pro running macOS Big Sur, browser is Chrome: Version 120.0.6099.109
Mobile device is IPhoneXR running IOS 17.1.1, browser is Chrome: Version Version 120.0.6099.119

So the code snippet to be used to repro (This was done from a react app)

  1. install @dicebear/core, and @dicebear/collection version 7.0.1 for both

  2. generate svg string with following code

import { createAvatar } from "@dicebear/core";
import { botttsNeutral } from "@dicebear/collection";

...

const avatar = createAvatar(botttsNeutral, {
seed: 'FViCMckurWzJok4mui4LBf9SQGAZnTsX9A1SppXDAnGm',
});

return avatar.toString();

  1. Render the svg with "react-inlinesvg": "^4.0.5",

Let me know if you need any more information.

Thanks again!

@FlorianKoerner
Copy link
Member

Should be fixed with version 8.0.0-rc.2. Can you confirm?

https://codesandbox.io/p/devbox/dicebear-394-7y5zsm

@sbermingham93
Copy link
Author

Hi thanks for putting in the fix! I have tested and seems to work for certain cases but not all

@sbermingham93
Copy link
Author

sbermingham93 commented Jan 16, 2024

image (4)

SEED: JA94JEt2iCHrPe9ABRsJFBccpsNcZC33YvsR7n684bmq

Operating System: MacOs

Browser: Brave

Dicebear Versions:
"@dicebear/collection": "^8.0.0-rc.2",
"@dicebear/core": "^8.0.0-rc.2",

Description:
See the yellow on one avatar, while red on the rest

@FlorianKoerner
Copy link
Member

Cannot reproduce your problem. To be able to help you, I need a public repository from you where the problem can be reproduced with little effort.

Brave
Bildschirmfoto 2024-01-20 um 09 26 28

Safari
Bildschirmfoto 2024-01-20 um 09 28 26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants