feat: replace HSLuv colors with OKLCh

This commit is contained in:
link2xt
2025-08-25 18:20:52 +00:00
committed by l
parent 776408c564
commit aaa83a8f52
5 changed files with 52 additions and 33 deletions

View File

@@ -32,7 +32,7 @@ async fn test_chat_info() {
"archived": false,
"param": "",
"is_sending_locations": false,
"color": 35391,
"color": 29377,
"profile_image": {},
"draft": "",
"is_muted": false,
@@ -1931,7 +1931,7 @@ async fn test_chat_get_color() -> Result<()> {
let t = TestContext::new().await;
let chat_id = create_group_ex(&t, None, "a chat").await?;
let color1 = Chat::load_from_db(&t, chat_id).await?.get_color(&t).await?;
assert_eq!(color1, 0x008772);
assert_eq!(color1, 0x613dd7);
// upper-/lowercase makes a difference for the colors, these are different groups
// (in contrast to email addresses, where upper-/lowercase is ignored in practise)