Function get_color

Source
pub fn get_color(
    is_self: bool,
    addr: &str,
    fingerprint: &Option<Fingerprint>,
) -> u32
Expand description

Returns a color for a contact having given attributes.

The color is calculated from contact’s fingerprint (for key-contacts) or email address (for address-contacts; should be lowercased to avoid allocation) and can be used for an fallback avatar with white initials as well as for headlines in bubbles of group chats.