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

How to get the background color for a default profile photo for users without one? #3177

Closed
skygate2012 opened this issue Dec 10, 2024 · 2 comments

Comments

@skygate2012
Copy link

There is a profile_accent_color_id field under the user class. But from the description it seems that this is a custom color premium users instead of the default color? If so, which api should one use to get the default color? If there is no such api, can you share the algorithm for generating the color? I see that it is consistent across the official clients.

@levlam
Copy link
Contributor

levlam commented Dec 10, 2024

Use user.accent_color_id: "Identifier of the accent color for ... backgrounds of profile photo ..".
The note "For Telegram Premium users only" in the documentation is redundant and will be removed.

@skygate2012
Copy link
Author

Thank you I was confused about that word.

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

2 participants