stream_color: Dim recipient bar background color.

This commit is contained in:
Aman Agrawal
2023-05-13 06:15:50 +00:00
committed by Tim Abbott
parent 8d06fa7e38
commit c96de330b0
2 changed files with 6 additions and 6 deletions

View File

@@ -47,8 +47,8 @@ export function get_recipient_bar_color(color) {
// Mixes 50% of color to 40% of white (light theme) / black (dark theme).
const using_dark_theme = settings_data.using_dark_theme();
color = get_stream_privacy_icon_color(color);
return colord(using_dark_theme ? "#000000" : "#ffffff")
.mix(color, using_dark_theme ? 0.43 : 0.35)
return colord(using_dark_theme ? "#000000" : "#f9f9f9")
.mix(color, using_dark_theme ? 0.38 : 0.22)
.toHex();
}

View File

@@ -538,7 +538,7 @@ test("format_drafts", ({override_rewire, mock_template}) => {
is_stream: true,
stream_name: "stream",
stream_id: 30,
recipient_bar_color: "#e6e6e6",
recipient_bar_color: "#ebebeb",
stream_privacy_icon_color: "#b9b9b9",
topic: "topic",
raw_content: "Test stream message",
@@ -571,7 +571,7 @@ test("format_drafts", ({override_rewire, mock_template}) => {
draft_id: "id3",
is_stream: true,
stream_name: "stream 2",
recipient_bar_color: "#e6e6e6",
recipient_bar_color: "#ebebeb",
stream_privacy_icon_color: "#b9b9b9",
topic: "topic",
raw_content: "Test stream message 2",
@@ -709,7 +709,7 @@ test("filter_drafts", ({override_rewire, mock_template}) => {
is_stream: true,
stream_name: "stream",
stream_id: 30,
recipient_bar_color: "#e6e6e6",
recipient_bar_color: "#ebebeb",
stream_privacy_icon_color: "#b9b9b9",
topic: "topic",
raw_content: "Test stream message",
@@ -722,7 +722,7 @@ test("filter_drafts", ({override_rewire, mock_template}) => {
is_stream: true,
stream_name: "stream 2",
stream_id: undefined,
recipient_bar_color: "#e6e6e6",
recipient_bar_color: "#ebebeb",
stream_privacy_icon_color: "#b9b9b9",
topic: "topic",
raw_content: "Test stream message 2",