Skip to content

Commit c9e5471

Browse files
committed
Tweak colours more to differentiate filter UI & lowlights btter
1 parent 25a63d5 commit c9e5471

File tree

7 files changed

+28
-17
lines changed

7 files changed

+28
-17
lines changed

src/components/send/send-tabs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const TabsContainer = styled.div.attrs(() => ({
1818
height: ${TAB_BAR_HEIGHT};
1919
box-sizing: border-box;
2020
21-
background-color: ${p => p.theme.containerBackground};
21+
background-color: ${p => p.theme.mainLowlightBackground};
2222
2323
font-size: ${p => p.theme.textSize};
2424

src/components/view/filters/filter-input.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ const FilterInputField = styled.input`
3636
border: none;
3737
outline: none;
3838
39-
background-color: ${p => p.theme.highlightBackground};
40-
color: ${p => p.theme.highlightColor};
39+
background-color: ${p => p.theme.inputBackground};
40+
color: ${p => p.theme.inputColor};
4141
font-size: ${p => p.theme.textSize};
4242
4343
::placeholder {
@@ -57,6 +57,8 @@ const FilterSuggestionsBox = styled.div`
5757
z-index: 1;
5858
5959
background-color: ${p => p.theme.mainBackground};
60+
color: ${p => p.theme.mainColor};
61+
6062
border: 1px solid ${p => p.theme.containerBorder};
6163
box-shadow: 0 2px 4px 0 rgba(0,0,0,${p => p.theme.boxShadowAlpha});
6264
@@ -71,7 +73,6 @@ const FilterSuggestionsBox = styled.div`
7173
border-radius: 4px;
7274
}
7375
74-
color: ${p => p.theme.highlightColor};
7576
font-size: ${p => p.theme.textSize};
7677
7778
&:empty {

src/components/view/filters/filter-suggestion-row.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ const SuggestionRowContainer = styled.div<{ isHighlighted: boolean }>`
2121
? p.theme.highlightBackground
2222
: p.theme.mainBackground
2323
};
24+
color: ${p => p.isHighlighted
25+
? p.theme.highlightColor
26+
: p.theme.mainColor
27+
};
2428
2529
${p => p.isHighlighted && css`
2630
${SuggestedText} {
@@ -62,13 +66,15 @@ const SuggestionDeleteButton = styled(IconButton).attrs(() => ({
6266

6367
const SuggestionDescription = styled(SuggestionRowPart)`
6468
background-color: ${p => p.theme.mainLowlightBackground};
69+
color: ${p => p.theme.mainColor};
6570
box-shadow:
6671
inset 0px 12px 8px -10px rgba(0,0,0,${p => p.theme.boxShadowAlpha}),
6772
inset 0px -8px 8px -10px rgba(0,0,0,${p => p.theme.boxShadowAlpha});
6873
6974
white-space: pre; /* Nowrap + show spaces accurately */
7075
overflow: hidden;
7176
text-overflow: ellipsis;
77+
font-style: italic;
7278
`;
7379

7480
export const FilterSuggestionRow = (props: {

src/components/view/filters/filter-tag.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ const FilterTagContainer = styled.div`
5050
margin-right: 5px;
5151
5252
background-color: ${p => p.theme.mainBackground};
53+
color: ${p => p.theme.mainColor};
54+
5355
border: 1px solid ${p => p.theme.containerWatermark};
5456
box-shadow: 0 2px 4px 0 rgba(0,0,0,${p => p.theme.boxShadowAlpha});
5557
border-radius: 3px;

src/components/view/filters/search-filter.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const SearchFilterBox = styled.div<{ hasContents: boolean }>`
4444
4545
border: 1px solid ${p => p.theme.containerBorder};
4646
box-shadow: inset 0 2px 4px 1px rgba(0, 0, 0, ${p => p.theme.boxShadowAlpha / 2});
47-
background-color: ${p => p.theme.highlightBackground};
47+
background-color: ${p => p.theme.inputBackground};
4848
color: ${p => p.theme.highlightColor};
4949
5050
font-size: ${p => p.theme.textSize};
@@ -74,7 +74,7 @@ const SearchFilterBox = styled.div<{ hasContents: boolean }>`
7474
background: linear-gradient(
7575
to right,
7676
transparent 0%,
77-
${p => polished.rgba(p.theme.highlightBackground, 0.9)} 25%
77+
${p => polished.rgba(p.theme.inputBackground, 0.9)} 25%
7878
);
7979
}
8080

src/styles.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ export const popColor = '#e1421f';
2929
const black = "#000000";
3030
const inkBlack = "#16181e";
3131
const inkGrey = "#1e2028";
32+
const darkerGrey = "#25262e";
3233
const darkGrey = "#32343B";
34+
const darkishGrey = "#53565e";
3335
const mediumGrey = "#818490";
3436
const lightGrey = "#9a9da8";
35-
const brightGrey = "#d1d3da";
36-
const ghostGrey = "#e4e8ed"; // Actual brand color is e6e8f2 but it's just too blue
37-
const almostWhite = "#f2f2f2";
37+
const ghostGrey = "#e4e8ed";
38+
const greyWhite = "#f2f2f2";
39+
const almostWhite = "#fafafa";
3840
const white = "#ffffff";
3941

4042
const darkerBlue = "#2d4cbd";
@@ -49,14 +51,14 @@ export const lightTheme = {
4951
titleTextFamily: 'Saira, "DM Sans", Arial, sans-serif',
5052
monoFontFamily: '"DM Mono", monospace',
5153

52-
mainBackground: white,
53-
mainLowlightBackground: almostWhite,
54+
mainBackground: almostWhite,
55+
mainLowlightBackground: greyWhite,
5456
mainColor: inkGrey,
5557

5658
lowlightTextOpacity: 0.65,
5759
boxShadowAlpha: 0.3,
5860

59-
pillContrast: 0.85,
61+
pillContrast: 0.9,
6062
pillDefaultColor: lightGrey,
6163

6264
primaryInputBackground: darkerBlue,
@@ -66,7 +68,7 @@ export const lightTheme = {
6668
secondaryInputColor: darkerBlue,
6769

6870
inputBackground: white,
69-
inputHoverBackground: almostWhite,
71+
inputHoverBackground: greyWhite,
7072
inputBorder: darkGrey,
7173
inputColor: inkGrey,
7274

@@ -103,7 +105,7 @@ export const darkTheme = {
103105
monoFontFamily: '"DM Mono", monospace',
104106

105107
mainBackground: darkGrey,
106-
mainLowlightBackground: inkBlack,
108+
mainLowlightBackground: darkerGrey,
107109
mainColor: white,
108110

109111
lowlightTextOpacity: 0.6,
@@ -120,10 +122,10 @@ export const darkTheme = {
120122

121123
inputBackground: inkBlack,
122124
inputHoverBackground: inkGrey,
123-
inputBorder: '#666',
125+
inputBorder: darkishGrey,
124126
inputColor: white,
125127

126-
highlightBackground: inkBlack,
128+
highlightBackground: darkishGrey,
127129
highlightColor: white,
128130

129131
popColor,

src/util/colors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function getTextColor(baseColor: string, mainColor: string, contrastRatio
99
// Calculate a color difference from 0 (black/white) - 1 (identical)
1010
const baseSimilarity = (polished.getContrast(baseColor, mainColor) - 1) / 20;
1111

12-
// Mix the colors, using between 30% & 100% of the base color, depending on how far
12+
// Mix the colors, using between 35% & 100% of the base color, depending on how far
1313
// off we are and how much constrast we're aiming for (i.e. more maincolor for HC theme)
1414
const constrastBias = 1 - contrastRatio;
1515
const baseWeighting = 0.35 + (baseSimilarity * constrastBias) * 0.65;

0 commit comments

Comments
 (0)