Skip to content

Instantly share code, notes, and snippets.

View jeffangelion's full-sized avatar
💩
writing shell scripts

Ivan Vatlin jeffangelion

💩
writing shell scripts
View GitHub Profile
@jeffangelion
jeffangelion / tg_color_picker.v
Created January 6, 2024 21:24
Get empty userpic color by Telegram ID as an official client
// https://github.com/telegramdesktop/tdesktop/blob/2ef8136308e31e07988ee4654b73ae2a5ab495dc/Telegram/SourceFiles/ui/empty_userpic.cpp#L257
// https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/SourceFiles/ui/chat/chat_style.cpp#L1033
struct Color {
red u8
green u8
blue u8
}
fn (c Color) str() string {