Problem: With options.xlsx_color_cells = True, VisiData honors a cell's explicit background fill but renders "Automatic" text color as the terminal default. When the fill and default have similar luminance (e.g., light-gray fill on a light terminal, or dark fill on a dark terminal), text becomes unreadable. Manually setting text to Black in Excel fixes contrast, confirming the issue is the "Automatic" pass-through.
Solution: When a cell has an explicit fill and "Automatic" text color, compute fill luminance and force black or white text accordingly. Alternatively, expose a fallback option (e.g., options.xlsx_auto_text_color) so users can set a default.
Repro:
- Create an
.xlsx with cells that have an explicit light-gray background and "Automatic" text color.
- Open it in VisiData with a dark terminal theme and
options.xlsx_color_cells = True.
- Observe that cell text is invisible.

Problem: With
options.xlsx_color_cells = True, VisiData honors a cell's explicit background fill but renders "Automatic" text color as the terminal default. When the fill and default have similar luminance (e.g., light-gray fill on a light terminal, or dark fill on a dark terminal), text becomes unreadable. Manually setting text to Black in Excel fixes contrast, confirming the issue is the "Automatic" pass-through.Solution: When a cell has an explicit fill and "Automatic" text color, compute fill luminance and force black or white text accordingly. Alternatively, expose a fallback option (e.g.,
options.xlsx_auto_text_color) so users can set a default.Repro:
.xlsxwith cells that have an explicit light-gray background and "Automatic" text color.options.xlsx_color_cells = True.