Skip to content

Commit 87035ff

Browse files
committed
feat: slightly increase saturation of colors
It really depends on the screen, but on Android phones with higher DPI than laptop screen the contrast looks a bit too low. It should not be increased too high because of clipping.
1 parent e0d123f commit 87035ff

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/chat/chat_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ async fn test_chat_info() {
3434
"archived": false,
3535
"param": "",
3636
"is_sending_locations": false,
37-
"color": 29377,
37+
"color": 29381,
3838
"profile_image": {},
3939
"draft": "",
4040
"is_muted": false,
@@ -1933,7 +1933,7 @@ async fn test_chat_get_color() -> Result<()> {
19331933
let t = TestContext::new().await;
19341934
let chat_id = create_group_ex(&t, None, "a chat").await?;
19351935
let color1 = Chat::load_from_db(&t, chat_id).await?.get_color(&t).await?;
1936-
assert_eq!(color1, 0x613dd7);
1936+
assert_eq!(color1, 0x6239dc);
19371937

19381938
// upper-/lowercase makes a difference for the colors, these are different groups
19391939
// (in contrast to email addresses, where upper-/lowercase is ignored in practise)

src/color.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fn rgb_to_u32(rgb: Rgb<u8>) -> u32 {
2828
/// Lightness is set to half (0.5) to make colors suitable both for light and dark theme.
2929
pub fn str_to_color(s: &str) -> u32 {
3030
let lightness = 0.5;
31-
let chroma = 0.22;
31+
let chroma = 0.23;
3232
let angle = str_to_angle(s);
3333
let oklch = Oklch::new(lightness, chroma, angle);
3434
let rgb = oklch.to_rgb(TransferFunction::Srgb);

src/contact/contact_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ async fn test_contact_get_color() -> Result<()> {
759759
let t = TestContext::new().await;
760760
let contact_id = Contact::create(&t, "name", "name@example.net").await?;
761761
let color1 = Contact::get_by_id(&t, contact_id).await?.get_color();
762-
assert_eq!(color1, 0x4947dc);
762+
assert_eq!(color1, 0x4844e2);
763763

764764
let t = TestContext::new().await;
765765
let contact_id = Contact::create(&t, "prename name", "name@example.net").await?;

0 commit comments

Comments
 (0)