- << " --dpi " << int(font_scaling_factor)
- << " --fg " << theApp()->hexName(fg)
- << " --bg " << theApp()->hexName(bg);
+ << " --dpi " << int(font_scaling_factor);
+
+ // FIXME XHTML
+ // The colors should be customizable.
+ if (!buffer_.isExporting()) {
+ ColorCode const fg = PreviewLoader::foregroundColor();
+ ColorCode const bg = PreviewLoader::backgroundColor();
+ cs << " --fg " << theApp()->hexName(fg)
+ << " --bg " << theApp()->hexName(bg);
+ }
+