Skip to content

Commit 9a32d23

Browse files
committed
fix color contrast yellow highlight
1 parent 90dcc60 commit 9a32d23

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

assets/custom-error-colors.css

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,42 @@
11
/*
2-
* Fix WCAG color contrast issues for ANSI colors in Quarto error outputs.
2+
* Fix WCAG color contrast issues for ANSI colors in Quarto cell error outputs.
33
* These colors are high-contrast replacements for default ANSI light-colors.
44
*/
55

66
.cell-output-error .ansi-red-fg,
77
.cell-output-error .ansi-bright-red-fg {
88
/* Replace light red/bright red with a darker, accessible red */
9-
color: #B30000; /* Example: Dark Crimson */
9+
color: #B30000;
1010
}
1111

1212
.cell-output-error .ansi-green-fg,
1313
.cell-output-error .ansi-bright-green-fg {
1414
/* Replace light green/bright green with a darker, accessible green */
15-
color: #006600; /* Example: Dark Green */
15+
color: #006600;
1616
}
1717

1818
.cell-output-error .ansi-cyan-fg,
1919
.cell-output-error .ansi-bright-cyan-fg {
2020
/* Replace light cyan/bright cyan with a darker, accessible cyan/teal */
21-
color: #006161; /* Example: Dark Teal */
21+
color: #006161;
2222
}
2323

24-
/* Add other colors as needed if they also fail contrast checks */
2524
.cell-output-error .ansi-yellow-fg,
2625
.cell-output-error .ansi-bright-yellow-fg {
27-
color: #886A00; /* Example: Dark Gold */
26+
color: #886A00;
2827
}
2928

3029
/* Ensure the general error text is also high contrast (often dark red/maroon) */
3130
.cell-output-error {
3231
/* This targets the error text that isn't specifically ANSI colored */
3332
color: #990000; /* Darker red for general error text */
33+
}
34+
35+
/*
36+
* Part of the output is highlighted with a yellow background. Force all text
37+
* on yellow backgrounds to be black for maximum contrast.
38+
*/
39+
.cell-output-error .ansi-yellow-bg,
40+
.cell-output-error .ansi-bright-yellow-bg {
41+
color: #000000 !important;
3442
}

0 commit comments

Comments
 (0)