mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 07:23:22 +00:00
stream_color: Increase contrast of stream icon color and background.
This commit is contained in:
@@ -41,7 +41,11 @@ export function get_corrected_color(hex_color: string): Colord {
|
||||
}
|
||||
|
||||
export function get_stream_privacy_icon_color(hex_color: string): string {
|
||||
return get_corrected_color(hex_color).toHex();
|
||||
const corrected_color = get_corrected_color(hex_color);
|
||||
if (settings_data.using_dark_theme()) {
|
||||
return corrected_color.toHex();
|
||||
}
|
||||
return corrected_color.darken(0.12).toHex();
|
||||
}
|
||||
|
||||
export function get_recipient_bar_color(color: string): string {
|
||||
|
||||
@@ -523,7 +523,7 @@ test("format_drafts", ({override_rewire, mock_template}) => {
|
||||
stream_name: "stream",
|
||||
stream_id: 30,
|
||||
recipient_bar_color: "#ebebeb",
|
||||
stream_privacy_icon_color: "#b9b9b9",
|
||||
stream_privacy_icon_color: "#9a9a9a",
|
||||
topic: "topic",
|
||||
raw_content: "Test stream message",
|
||||
time_stamp: "7:55 AM",
|
||||
@@ -557,7 +557,7 @@ test("format_drafts", ({override_rewire, mock_template}) => {
|
||||
stream_name: "stream 2",
|
||||
stream_id: 40,
|
||||
recipient_bar_color: "#ebebeb",
|
||||
stream_privacy_icon_color: "#b9b9b9",
|
||||
stream_privacy_icon_color: "#9a9a9a",
|
||||
topic: "topic",
|
||||
raw_content: "Test stream message 2",
|
||||
time_stamp: "Jan 21",
|
||||
@@ -704,7 +704,7 @@ test("filter_drafts", ({override_rewire, mock_template}) => {
|
||||
stream_name: "stream",
|
||||
stream_id: 30,
|
||||
recipient_bar_color: "#ebebeb",
|
||||
stream_privacy_icon_color: "#b9b9b9",
|
||||
stream_privacy_icon_color: "#9a9a9a",
|
||||
topic: "topic",
|
||||
raw_content: "Test stream message",
|
||||
time_stamp: "7:55 AM",
|
||||
@@ -717,7 +717,7 @@ test("filter_drafts", ({override_rewire, mock_template}) => {
|
||||
stream_name: "stream 2",
|
||||
stream_id: 40,
|
||||
recipient_bar_color: "#ebebeb",
|
||||
stream_privacy_icon_color: "#b9b9b9",
|
||||
stream_privacy_icon_color: "#9a9a9a",
|
||||
topic: "topic",
|
||||
raw_content: "Test stream message 2",
|
||||
time_stamp: "Jan 21",
|
||||
|
||||
Reference in New Issue
Block a user