question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a way for the client to manage the default avatar colors

See original GitHub issue

Currently, the colors for the generated avatars are internal to the application. While it is possible to use

        import { defaultColors } from "ngx-avatar";
        defaultColors.splice(0, defaultColors.length);
        defaultColors.push("red", "green", "blue");

to change them, this has a hacky feel to it. There should be a nicer, more straightforward way to set the avatar colors.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
swekocommented, Sep 4, 2017

Tnx, I’ve just gotten around to updating it, and it works fine.

1reaction
HaithemMosbahicommented, Aug 15, 2017

Hello @sweko, I have been thinking of passing the array of default colors when the AvatarModule is imported. So If you would like to provide your own set of colors, the import of AvatarModule would look like this :

AvatarModule.forRoot(arrayOfColors)

Something similar to the RouterModule of Angular when we pass the array of routes. What do you think ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Choose default avatar color - Auth0 Community
The default avatar create by auth0 (retrieved in the jws token) is a solid color background with two letters from the user's name....
Read more >
How do I change the color of my letter avatar?
Solved: Currently, my letter avatar is purple with a white C on it. I would like to change it to a different color...
Read more >
Can we change the default color of the Default Ava...
Hi,. Can we change the default color of the Default Avatar, its the grey circle with the users initials in it?
Read more >
How do I edit my profile? - monday.com Support
Step 1: Click on your profile picture (or initials) on the bottom left of the screen, select "Admin" > "Customization" > "User profile"....
Read more >
Add an option to change default avatar's color. - Discord Support
Add an option to change default avatar's color. ... given us a way to theme. even just simple color-pickers for the colors in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found