强调色

Telegram 用户和频道可以更改个人资料页面和消息的强调色和背景图案!

模式:

peerColor#b54b5acf flags:# color:flags.0?int background_emoji_id:flags.1?long = PeerColor;help.peerColorSet#26219a58 colors:Vector<int> = help.PeerColorSet; help.peerColorProfileSet#767d61eb palette_colors:Vector<int> bg_colors:Vector<int> story_colors:Vector<int> = help.PeerColorSet;help.peerColorOption#adec6ebe flags:# hidden:flags.0?true color_id:int colors:flags.1?help.PeerColorSet dark_colors:flags.2?help.PeerColorSet channel_min_level:flags.3?int group_min_level:flags.4?int = help.PeerColorOption;help.peerColorsNotModified#2ba1f5ce = help.PeerColors; help.peerColors#00f8ed08 hash:int colors:Vector<help.PeerColorOption> = help.PeerColors;stickerSet#2dd14edc flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true emojis:flags.7?true text_color:flags.9?true channel_emoji_status:flags.10?true creator:flags.11?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumbs:flags.4?Vector<PhotoSize> thumb_dc_id:flags.4?int thumb_version:flags.4?int thumb_document_id:flags.8?long count:int hash:int = StickerSet;user#20b1422 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true bot_attach_menu:flags.27?true premium:flags.28?true attach_menu_enabled:flags.29?true flags2:# bot_can_edit:flags2.1?true close_friend:flags2.2?true stories_hidden:flags2.3?true stories_unavailable:flags2.4?true contact_require_premium:flags2.10?true bot_business:flags2.11?true bot_has_main_app:flags2.13?true id:long access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?Vector<RestrictionReason> bot_inline_placeholder:flags.19?string lang_code:flags.22?string emoji_status:flags.30?EmojiStatus usernames:flags2.0?Vector<Username> stories_max_id:flags2.5?int color:flags2.8?PeerColor profile_color:flags2.9?PeerColor bot_active_users:flags2.12?int bot_verification_icon:flags2.14?long send_paid_messages_stars:flags2.15?long = User;channel#fe685355 flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true slowmode_enabled:flags.22?true call_active:flags.23?true call_not_empty:flags.24?true fake:flags.25?true gigagroup:flags.26?true noforwards:flags.27?true join_to_send:flags.28?true join_request:flags.29?true forum:flags.30?true flags2:# stories_hidden:flags2.1?true stories_hidden_min:flags2.2?true stories_unavailable:flags2.3?true signature_profiles:flags2.12?true autotranslation:flags2.15?true broadcast_messages_allowed:flags2.16?true monoforum:flags2.17?true forum_tabs:flags2.19?true id:long access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int restriction_reason:flags.9?Vector<RestrictionReason> admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int usernames:flags2.0?Vector<Username> stories_max_id:flags2.4?int color:flags2.7?PeerColor profile_color:flags2.8?PeerColor emoji_status:flags2.9?EmojiStatus level:flags2.10?int subscription_until_date:flags2.11?int bot_verification_icon:flags2.13?long send_paid_messages_stars:flags2.14?long linked_monoforum_id:flags2.18?long = Chat;---functions---help.getPeerColors#da80f42f hash:int = help.PeerColors; help.getPeerProfileColors#abcfa9fd hash:int = help.PeerColors;account.getDefaultBackgroundEmojis#a60ab9ce hash:long = EmojiList;account.updateColor#7cefa15d flags:# for_profile:flags.1?true color:flags.2?int background_emoji_id:flags.0?long = Bool;channels.updateColor#d8aa3671 flags:# for_profile:flags.1?true channel:InputChannel color:flags.2?int background_emoji_id:flags.0?long = Updates;

peerColor构造函数包含一个调色板 ID () 和一个自定义表情符号贴纸 »( ),该贴纸将使用调色板中的颜色重新着色,并在整个调色板中扩散,从而生成一个背景,该背景可用于用户的个人资料页面以及 UI 中的其他位置,例如网页预览消息框架和引用或回复启用了自定义消息强调的频道或用户发送的消息时的消息强调色。idbackground_emoji

id颜色调色板由颜色值(而不是 RGB24 颜色)标识;使用help.getPeerProfileColors获取可在个人资料页面背景中使用的所有颜色调色板(由help.peerColorOption构造函数表示),并使用help.getPeerColors获取可在消息强调色中使用的所有颜色调色板。

颜色调色板由 ` help.peerColorOption`构造函数表示:调色板 ID 包含在 `<pall_id>`字段中color_id;浅色模式调色板包含在 `colors<pall_id>` 字段中,深色模式调色板包含在 `dark_colors<pall_id>` 字段中。
如果hidden设置了 `<flag>` 标志,则在用户选择个人资料页面或消息强调色使用的调色板时,不应将该调色板显示为选项。

实际使用的颜色包含在help.peerColorSet (由help.getPeerColors返回,包含消息强调色调色板)或help.peerColorProfileSet (由help.getPeerColors返回,包含个人资料页面调色板)中,有关更多信息,请参阅相关的构造函数页面。

使用account.getDefaultBackgroundEmojis获取可在调色板背景中使用的自定义表情符号的 ID 列表。

所有自定义表情符号贴纸套装中的自定义表情符号 »以及text_color旗帜套装也可以用于相同的目的。

使用account.updateColor更新当前帐户的消息强调色和/或个人资料页面的颜色;请注意,当前帐户必须订阅Telegram Premium才能调用此方法。
使用channels.updateColor更新频道/超级群组的个人资料页面强调色或频道消息强调色的颜色。

请注意,频道/超级组只有在达到help.peerColorOption构造函数中/字段为所选调色板 指定的至少增强级别后,才能使用消息强调调色板或配置文件调色板。channel_min_levelgroup_min_level

此外,要更改配置文件调色板,通道/超级组也必须至少达到 »/ »配置参数中指定的增强级别。channel_profile_bg_icon_level_mingroup_profile_bg_icon_level_min

所选消息强调调色板将对频道中的其他用户可见。color和用户字段;color更改它将发出updateChannel/updateUser更新。

选定的配置文件调色板将显示在用户和频道字段中;更改它将发出updateUser更新/updateChannel更新。profile_colorprofile_color

如果未为对等方指定调色板,则必须从红色、橙色、紫色、绿色、青色、蓝色、粉色(最终根据客户端的主题进行调整)中随机选择一种颜色作为消息强调调色板,对于遇到的每个对等方一次。