- ColorCode const bg = buffer_.isExporting()
- ? Color_white : PreviewLoader::backgroundColor();
- ColorCode const fg = buffer_.isExporting()
- ? Color_black : PreviewLoader::foregroundColor();
- std::string bg_name, fg_name;
- if (theApp()) {
- fg_name = theApp()->hexName(fg);
- bg_name = theApp()->hexName(bg);
- } else {
- ColorCache cc;
- fg_name = ltrim(fromqstr(cc.get(fg).name()), "#");
- bg_name = ltrim(fromqstr(cc.get(bg).name()), "#");
+ if (!buffer_.isExporting()) {
+ ColorCode const fg = PreviewLoader::foregroundColor();
+ ColorCode const bg = PreviewLoader::backgroundColor();
+ cs << " --fg " << theApp()->hexName(fg)
+ << " --bg " << theApp()->hexName(bg);