Skip to content

Commit b7e8029

Browse files
committed
Made colors accessible based on Web Content Accessibility Guidelines
1 parent 68b287e commit b7e8029

File tree

2 files changed

+30
-26
lines changed

2 files changed

+30
-26
lines changed

color.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,34 @@ function themeWindow_default(window) {
1919
}
2020

2121
async function handleMessage(request, sender, sendResponse) {
22-
22+
2323
let currentWindow = await browser.windows.getLastFocused();
2424

2525
// set colors
2626
red = "#b02300";
2727
lightRed = "#df6142";
28-
orange = "#da5b00";
29-
lightOrange = "#e38847"
30-
yellow = "#ffea00";
31-
lightYellow = "#fff36d";
32-
green = "#07a11e";
33-
lightGreen = "#61d885";
34-
blue = "#0065d1";
35-
lightBlue = "#5a99dc";
28+
orange = "#d3a116";
29+
lightOrange = "#dfbb58"
30+
yellow = "#f5f423";
31+
lightYellow = "#fafa8e";
32+
green = "#3f6215";
33+
lightGreen = "#5e8231";
34+
blue = "#5660fc";
35+
lightBlue = "#727ae6";
3636
purple = "#8509eb";
37-
lightPurple = "#a773d1";
38-
pink = "#cf2a8d";
39-
lightPink = "#d480b3";
37+
lightPurple = "#a266cd";
38+
pink = "#ba4a8e";
39+
lightPink = "#cb76a9";
4040

4141
switch (request.greeting) {
4242
case "Red":
4343
themeWindow(currentWindow, "white", red, lightRed);
4444
break;
4545
case "Orange":
46-
themeWindow(currentWindow, "white", orange, lightOrange);
46+
themeWindow(currentWindow, "black", orange, lightOrange);
4747
break;
4848
case "Yellow":
49-
themeWindow(currentWindow, "white", yellow, lightYellow);
49+
themeWindow(currentWindow, "black", yellow, lightYellow);
5050
break;
5151
case "Green":
5252
themeWindow(currentWindow, "white", green, lightGreen);

popup.css

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,51 +31,55 @@ body {
3131
}
3232

3333
.button2 {
34-
background-color: #da5b00;
34+
color: black;
35+
background-color: #d3a116;
3536
}
3637

3738
.button2:hover {
38-
background-color: #e38847;
39+
color: black;
40+
background-color: #dfbb58;
3941
}
4042

4143
.button3 {
42-
background-color: #ffea00;
44+
color: black;
45+
background-color: #f5f423;
4346
}
4447

4548
.button3:hover {
46-
background-color: #fff36d;
49+
color: black;
50+
background-color: #fafa8e;
4751
}
4852

4953
.button4 {
50-
background-color: #07a11e;
54+
background-color: #3f6215;
5155
}
5256

5357
.button4:hover {
54-
background-color: #61d885;
58+
background-color: #5e8231;
5559
}
5660

5761
.button5 {
58-
background-color: #0065d1;
62+
background-color: #5660fc;
5963
}
6064

6165
.button5:hover {
62-
background-color: #5a99dc;
66+
background-color: #727ae6;
6367
}
6468

6569
.button6 {
66-
background-color: #8509eb;
70+
background-color: #8533c1;
6771
}
6872

6973
.button6:hover {
70-
background-color: #a773d1;
74+
background-color: #a266cd;
7175
}
7276

7377
.button7 {
74-
background-color: #cf2a8d;
78+
background-color: #ba4a8e;
7579
}
7680

7781
.button7:hover {
78-
background-color: #d480b3;
82+
background-color: #cb76a9;
7983
}
8084

8185
.button[type="reset"] {

0 commit comments

Comments
 (0)