Jump to content

Create a new color palette

From The Document Foundation Wiki
This page contains changes which are not marked for translation.

Foreword

The video "Creating a Color Palette in LibreOffice" links to this page, which contains further information and details. This description is rated as "difficult." Knowledge of folder structures and file types on a PC, as well as number systems (binary, hexadecimal), is required. This page is based on the LibreOffice documentation.

Link to the Video

Link to the Video (in German [DE]): Eine Farbpalette erstellen in LibreOffice


Colors and Color palettes

Colors in LibreOffice are defined in color palettes. The term "color palette" is used analogously to "color table" and "color list." LibreOffice comes with a built-in "standard" color palette. You can also create your own (custom) color palettes. When a color palette is selected, additional colors are displayed alongside those in the palette.

Color Palette "Standard" / Farbpalette "Standard"

Color palettes in LibreOffice

Color palettes in LibreOffice are stored as files and have the file extension "SOC". These are just text files. On Windows 10 / 11, these "SOC" files are stored in the following location and they are for all users:
C:\Program Files\LibreOffice\share\palette\
On Linux, these "SOC" files are stored in the following location and they are for all users:
/opt/libreoffice7.1/share/palette/ (This one is for LibreOffice 7.1)
If you open these files with a text editor, you will find that they begin with the line <xml version="1.0" encoding="UTF-8">. The following representation corresponds to the top row of the "Standard" color chart from black to white (see below). When working with LibreOffice, you can choose from several color palettes.

Color palettes created by the user

User Color palettes are stored as files and have the extension "SOC". User-created Color palettes are stored in the so-called user profile of LibreOffice,
on Windows, you can find these "SOC" files in :
C:\Users\USERNAME\AppData\Roaming\LibreOffice\4\user\config\
On Linux, you can find these "SOC" files in :
~/.config/libreoffice/4/user/config/

Palette selection / Palettenauswahl

Create a New Color palette File

So each user can create his own custom Color palettes. Create a new Color palette file by resaving the "standard" Color palette under a different name. Copy standard.soc to your LibreOffice user folder. You need give the file a new name. Rename it to Custom.soc if you want. Or you take one of the two sample files below and modify them. Scroll further down in this document to see the links to My_palette 01.soc and My_palette 02.soc. To create your own colors, you need to change the color values and color names in the file. You can open and change the file with a simple text editor, such as Notepad, Kate or whatever your OS provides. When you open the SOC file, you will see lines such as these:
<draw:color draw:name="C-red 1" draw:color="#FF2424"/>
<draw:color draw:name="C-red 2" draw:color="#FC4242"/>
<draw:color draw:name="C-red 3" draw:color="#F58162"/>

Note:
Example of gray values from black to white in the Standard palette.

Example of the gray values / Beispiel für die Grauwerte

Note:
The hexadecimal value is to be considered in three groups for the RGB value. Two hexadecimal digits each are one group and must be converted to decimal values separately. See also: Convert color values

three groups for the RGB value / drei Gruppen für den RGB-Wert

Each line represents a color in the color palette. You are free to change the color name and the actual color to your liking. The colors are expressed in a hexadecimal code format. If there are already colors with the same name but a different hex code, the name might not be displayed correctly. In the example of the three lines above, "C-" was prefixed. If you are not sure which colors you want to use, check out "More Info:" Your new color palette is only available for selection in LibreOffice when LibreOffice is restarted.

Note:
Remember to back up your newly created soc files.

Add a color in the custom Color palette

Basis for this example: Writer, Paragraph style, custom Color palette.

  1. Right-click on the "Default Paragraph Style" and choose New. Click on the tab "Area" and choose the button Color.
  2. At New select the desired color via RGB or Hex value or via the Pick button. Click on the Add button at "Custom Palette". In the "Name" dialog, enter a name for your new color and click OK.

The new color will be automatically added to the "Custom" Color palette. Step 2. repeat for other colors you want. When you have entered all the colors you want click Cancel.

in the "Paragraph Style" dialog pick a Color

The new Custom colors are now available. See also: Colors

Extension for the custom palette

Export all colors from a custom palette to a new extension to easily share palettes. You need to download and install the extension. The menu entry "Export Custom Palette" is then added to the Tools menu. You can choose a name for the palette, identifier and version, set publisher's name and link, and last but not least the name of the extension file.
Here you can download the extension.
Online-Help: Extension Manager
Description in the blog.

Color selection variants

The HSB color space

HSL and HSV Explains the HSL and HSV color space.

The RGB color space

RGB color spaces Explains the RGB color spaces.

The CMYK color model

CMYK color model Explains the CMYK color model.

Further Information

Examples of self-created soc files

When downloading the files have the extension ODT!

change the file extension to SOC / ändern Sie die Dateiendung in SOC

Warning:
If you have one of the files stored on your computer, you must change the file extension to SOC.

My_palette 01.soc Contains predominantly very light pastel colors, which are well suited for backgrounds.
My_palette 02.soc Contains tonal values adjusted for different colors.
75LO AppColors.soc With Colors from: Design/Branding
LO_ColorTable.soc Various options for the AppColors colors.

My-Palette_01 My-Palette_02 75LO AppColors LO_ColorTable

Select color in the LibreOffice Components

The new color palette is of course available in all Components after restarting LibreOffice. In the individual Components of LibreOffice, the new color palettes and colors can now be selected. See also: Use Colors in LibreOffice

Selecting a color with displayed color values

Three color tables (examples) from the Internet with the corresponding RGB values are also a good aid here. You find these under:
Branding_Color_Table (TDF)
Farbtabelle (Wikipedia)
Farbtabelle (genealogy.net)
Here you can select colors as desired or take over the corresponding RGB values.

Documentation / Manuals

Here you will find the Documentation / Manuals: https://documentation.libreoffice.org/en/english-documentation/

Any questions?

For questions on this topic go to: Ask.LibreOffice

Get Involved

Join us today and help us to make it even better! : Get Involved

LibreOffice is Free Software and is made available free of charge. Your donation, which is purely optional, supports our worldwide community. If you like the software, please consider a Donation.