Change document background colours in "Application Colours" for different applications

Changing the document colour in the “Application Colours” section of LibreOffice options allows me to change how a document looks when i’m working on it, without changing the actual colour of a document when viewed on other devices. This is great for dark mode.

However, the “Document Colour” option changes the background for all LibreOffice applications, but i want slightly different shades of black for Writer documents and Calc documents. Is this possible? My gut tells me that this isn’t accomplished easily, though i’m not afraid to get dirty with some code.


The LibreOffice is an integrated office suite. There are many common things and common settings in the different applications. The Application background color is on of them.

See this answer by @mikekaganski.

This is a good answer, but i’m using linux so i’m not quite sure how to achieve the same thing this way since linux doesn’t have environment variables. Would you know of a way to adapt this?

It seems the core concept of that answer is to use commands to open instances of writer/calc using different config folders. If i can find a bash command which allows me to do this, i should be able to figure out the rest myself.

Of course Linux does have environment variables. But that is not the point here. Mike’s answer names UserInstallation an environment variable because it is a parameter of LibreOffice’s own environment (-env), but effectively he gives command line examples to invoke the soffice executable with different user profile locations. On Linux you would call the proper executable and name the profile path locations differently, but otherwise it’s the same. For example, from command line or a shell script:

/usr/bin/soffice "-env:UserInstallation=file://$HOME/.config/libreoffice/profile-writer" --writer


/usr/bin/soffice "-env:UserInstallation=file://$HOME/.config/libreoffice/profile-calc" --calc

This assumes of course that your Linux HOME environment variable is correctly set to /home/yourusername … which should be the case on all systems. It would then be expanded to

/usr/bin/soffice "-env:UserInstallation=file:///home/yourusername/.config/libreoffice/profile-calc" --calc

(note the triple /// slashes after file: which is the correct URI form for the root directory on localhost).

1 Like

Works beautifully. Thank you both!

1 Like