adding / using custom colours to LibreOffice

I'm using 5.4.1.2.0+ on a Debian/Buster AMD64 system.

I volunteer with several organizations, some of whom have standard colours that I would like to add to the LibreOffice colour palette. However the formerly available Tools | Options | Colors customization feature seems to have disappeared.

I noticed that the font colour chooser allows you to use custom colours but not add them to the palette. While usable, it's not a good solution when you are going to be using the same colours repeatedly.

After more googling, I eventually found a way of adding custom colours - by creating a shape then right-clicking on it and selecting area. This allows me to add colours to the custom palette (and apparently only the custom palette - even if I select a different palette, the new colour ends up in custom).

While this is sufficient for what I want to do, it seems rather arcane to bury this useful option in shapes when it clearly can be used for anything that has colour. To make matters worse, the font colour | custom colour dialogue allows you to define colours using RGB and CMYK values while the shape colour dialogue only allows RGB colours (but does allow you to save them).

I suggest that the developers should fix this duplication of effort by using only a single colour dialogue that combines the best features of both existing dialogues. They should also restore this to the Tools | Options menu.

Hi Gary,

Gary Dale schrieb:

I'm using 5.4.1.2.0+ on a Debian/Buster AMD64 system.

I volunteer with several organizations, some of whom have standard
colours that I would like to add to the LibreOffice colour palette.
However the formerly available Tools | Options | Colors customization
feature seems to have disappeared.

Yes it was removed to reduce complexity for normal users.

I noticed that the font colour chooser allows you to use custom colours
but not add them to the palette. While usable, it's not a good solution
when you are going to be using the same colours repeatedly.

If you, as single user, need a color repeatedly, then you can add this color to your personal palette "Custom". It is not a real palette, but part of your personal registrymodifications.xcu. This file holds the recent colors too. But a normal user does not need to know these details.

After more googling, I eventually found a way of adding custom colours -
by creating a shape then right-clicking on it and selecting area. This
allows me to add colours to the custom palette (and apparently only the
custom palette - even if I select a different palette, the new colour
ends up in custom).

If you want to maintain "corporate identity" colors, storing them in "custom" is wrong anyway. So do not try to find any "tricks".

You should use a *.soc file stored in share/palette for those colors. You can add the colors to one of the existing files or make a totally new such file.
The file is a simple xml-file and can be edit with any editor.

You only need to add one line per color following the example
<draw:color draw:name="Black" draw:color="#000000" />
Instead of "Black" you write the text, which the user will see.
Instead of 000000 you write the code, which you see in the 'Hex' field in the Area > Color dialog. If you work in Draw you can use Format > Area without any need of a shape.

That way each user, who will use LibreOffice will get these special colors automatically.

You need writing rights from the OS to change or add files in share/palette.

Kind regards
Regina

Hi.
There is a bit of a similar discussion regarding table background colours and helpful information from Regina here;
http://nabble.documentfoundation.org/Table-background-colours-in-5-3-td4221285.html
steve

For those that insist on creating colour palettes from within LibO:
* Install the _Colour Palette Exporter_ extension;
* Create the desired palette by modifying the font colour of a paragraph
style;
* Export the resulting palette;

Those who prefer to do things the easy way:
* Fire up a text editor;
* Start writing the appropriate xml code;
* Save the palette;

My recommendation is that if organisation branding includes predefined
colours for charts, then the filename has to be standard.soc, otherwise
use Organisation_Name_Branding.soc .

Distribute the palette to the organization.
Include instructions on how to correctly install the palette.

Installation instructions differ according to one's specific platform.
(For at least one Linux distro, colour palettes can not be customized,
unless you have support contract with the distro vendor.)

jonathon

Hi Toki,

Toki schrieb:
[..]

Installation instructions differ according to one's specific platform.
(For at least one Linux distro, colour palettes can not be customized,
unless you have support contract with the distro vendor.)

If a distro vendor will prevent using it from the share folder, you can put the file into the 'config' folder of each user profile. It is still read from there, even though no UI exists to generate such file there.

Kind regards
Regina

In this specific instance, there is no config folder.

That was the first thing I tried doing.

If I figure out how to change the default palettes, I'll document it on
my blog.

jonathon

That is what I do, mostly.  I now prefer to have many smaller dedicated palettes instead of a few large ones.
The need for a company-wide palette is a great idea for a specific SOC file.

This is the hidden folder within Ubuntu is where I place for the color palettes I created.

"/home/timothy/.config/libreoffice/4/user/config"

I know where the system files for LibreOffice, including the .soc files, are located, but it is easier to place my color.soc files in the hidden ".config" folder instead of editing a system folder like this "root level" directory/folder “/opt/libreoffice5.3/share/palette”  I would rather edit the ".config/libreoffice/" folder over editing the "/opt/" one 9 times out to 10 easily.

I have made a few palettes and place them on my "libreoffice-na.us" page.

Here is an edited version of one so you do not have to wade through several pages of color text definitions.  I used a palette's SOC file as a template for my versions.  There may be an extended "ooo:color-table" script, but this XML works fine.  The only thing I have found is that using a text editor, or even Writer, Ubuntu seems not to associate the resulting "color-palette.soc" file as a "xml" file.  These created palettes work fine, since the start and ending lines are "xml" script identifiers.

    <?xml version="1.0" encoding="UTF-8"?>
    <ooo:color-table
    xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
    xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:svg="http://www.w3.org/2000/svg"
    xmlns:ooo="http://openoffice.org/2004/office">

        <draw:color draw:name="rope" draw:color="#8e4d1e"/>
        <draw:color draw:name="oregon" draw:color="#9b4703"/>
        <draw:color draw:name="richgold" draw:color="#a85307"/>
        <draw:color draw:name="korma"  draw:color="#8f4b0e"/>

    </ooo:color-table>

This edited color palette actually have over 70 orange colors and hues.  Another is one with brown and wood colors.  I had a hard time to find a specific color for specific need - like a good wood brown - for a project's image or text color.

I'm frankly dumbfounded by your explanations. You remove a generally useful dialogue to reduce complexity for normal users while simultaneously maintaining two different dialogues to set colours, each of which looks and works differently. Then you suggest that to do something that is in the use case of any normal organizational user (i.e. just about anyone who uses a word processor), you suggest creating/modifying XML files!

I agree that storing organizational (not necessarily corporate) colours in "custom" may not always be the best idea, but given their small number in any rational organization, creating a separate palette for them is arguably also not a good idea. My preference is to just add them to the standard palette and let the colour names identify them.

You've already got all the code you need to address the problem properly. Writer's code just isn't organized properly. If it was, you wouldn't have the two (maybe more - I haven't really looked) dialogues doing largely the same job but neither doing it really well.

The primary function of an organisation branding palette, is to have a
formal description of the _only_ colours used in content produced by,
for, or on behalf of the organization. As such, having _one_ palette
that consists only of the organisation branding palette makes sense.

By way of example, the official colour palette of various organisations:
* LibreOffice: 27 colours;
* North Carolina State: 13 colours;
* University of Leeds: 4 colours;
* University of Arizona: 22 in the official palette, 24 in the
unofficial palette;
* University of South Dakota: 9 colours for printing, 9 colours for the web;
* UPS: 4 colours;

Back when Mary Kay was alive, woe betide anybody who delivered anything
for her company, that wasn't in a colour that wasn't in the official
Mary Kay colour palette. (_Even their Uzi's Are Pink_ wasn't much of an
exaggeration.)

jonathon

If creating a small color palette is not a good idea, then add more colors to it AFTER you have the "company" colors.

You could start with the - company's colors,
    then LibreOffice colors,
    then the web safe colors,
    and any other colors you might want to use.

Your custom palette can represent all of the colors you use, not just the small number of official colors your company uses. They can be in any order or groupings.

As for the post stating concern about creating/editing XML files, do not worry.  It is really easy.  If you make a mistake, then the palette you create will not effect others.

That is why I use the  LibreOffice .config folder for the SOC file[s] for testing and more.  If you have Windows, it might not be as easily as I have with Ubuntu Linux.  Still, the color palette file[s] is a lot easier than other XML files I have seen from other applications.

Still misses the point. Normal users shouldn't have to fiddle around with XML files to create custom palettes. LibreOffice already has at least two dialogues that allow users to define custom colours. The real problem are that they:
1) are different, with each one having features the other lacks
2) aren't where a normal user would expect to find them.

The Format | Character | Font effects | Pick a Color dialogue allows you to define colours in RGB, HSB and CMYK formats but doesn't allow you to name the colour nor save it to a palette. This is the same dialogue as used for Shapes | Line colours. Conversely the Shapes | Area colour dialogue only allows you to define RGB colours (unless you notice the "pick" button, which then brings up the other colour dialogue instead of bringing up an eye-dropper to let you pick a colour from elsewhere on your screen) but lets you give them a name and save them in the custom palette.

This is a bizarre duplication of effort. Why are area colours given second class status with respect to how you define them while line and character colours are given second class status with respect to being reusable?

A secondary concern is why isn't there a palette management tool? There are 11 palettes available in my copy of Writer. I'm not sure if that is normal or not since two of them are named "standard". Are some of them from other applications?

Either way, with that many palettes in play, there should be a way to manage them other than fiddling with XML files. At the very least, a simple tool to create a named palette and add colours to it shouldn't be difficult to add to the Tools | Options dialogue. Then you wouldn't need to be able to add custom colours through other dialogues, which would simplify the application.

FYI: The palette list I see is:
custom
standard
tonal
standard
html
breeze
chart-palettes
libreoffice
freecolour-hlc
tango
Document colors

The last one seems to be auto-generated to show all the colours used in the current document.

Either way, with that many palettes in play, there should be a way to manage them other than fiddling with XML files.

Palettes are function specific. As such, if made according to the user
specifications, there is no legitimate reason to change anything within
them.

In terms of creating the palette, it is several orders of magnitude
easier to do so, using XML, than colour pickers. (Try creating the
Resena Paint colour palette using a GUI. Doable, but instead of taking
ten or so minutes, you'll spend hours, and need a second person to proof
read the resulting XML file.)

FYI: The palette list I see is:

standard
standard

What is the extension of those two files?

Regardless, no OS allows two files in the directory to have an identical
name. Some operating systems allow filenames to differ, only by case
that used for one or more glyphs.

jonathon

Either way, with that many palettes in play, there should be a way to manage them other than fiddling with XML files.

Palettes are function specific. As such, if made according to the user
specifications, there is no legitimate reason to change anything within
them.

I agree that there are some users do not want to create a color palette, but add just a few colors they need to use.  I remember doing that a few years ago, for a specific project, before I looked into creating my first color palette.  That seems to be the reason for the "custom" palette - which I currently have empty.

In terms of creating the palette, it is several orders of magnitude
easier to do so, using XML, than colour pickers. (Try creating the
Resena Paint colour palette using a GUI. Doable, but instead of taking
ten or so minutes, you'll spend hours, and need a second person to proof
read the resulting XML file.)

Yes creating the XML palette is easy to do.  All you need is to rename one of the small color palettes and then replacing the values of a line - like this one - with your colors.

<draw:color draw:name="Tango: Aluminium 3" draw:color="#babdb6" />

All you need to do is copy/paste this type of line, then replace the "Tango: Aluminium 3" with a new name.  Then, change this HTML color value of "#babdb6" to the color you want to use.

I have a color palette with Resena colors - over 1370 of them.  I added LibreOffice Branded colors, as well of a few others, bringing the total to about 1400 of them.

Below is the color palette file and then the PDF file of 10 pages with the color names and HTML color codes.

http://libreoffice-na.us/colors_resene.soc

http://libreoffice-na.us/resene-a--Alphabetical-Color-Chart.pdf

I do have other PDF files for other color palette PDF files.  Only some of them are listed on the "libreoffice-na.us" site.  The Resene palette is not in the same order as the PDF file.  I have 6 versions with it either unsorted or sorted by different methods. using these PDF files, I have searched for specific colors/hues, like wood-brown, gold-like, oranges, etc.. Then I created SOC files for these type of colors.

The PDF files for the large ones, can be found on a web site link on the top of each page of these PDF files.  They are a great way to see defined color names and their associated HTML color code.

Luck was with me when I was given the text list of colors for several large SOC files.

To be honest, if you use a color picker on these PDF color "boxes" you may find the visible color may not be the exactly same color code as listed in the page.  The problem might stem from the software that converted the image files to the PDF pages.  Also, for me, my printed pages are darker then what is shown on the display/monitor.  Syncing the printer to my laptops and desktops is not something most users can do for themselves.  Also only a few printers have drives with options to "tweak" the printed colors.

FYI: The palette list I see is:
standard

What is the extension of those two files?

Regardless, no OS allows two files in the directory to have an identical
name. Some operating systems allow filenames to differ, only by case
that used for one or more glyphs.

jonathon

Yes, Color.soc and color.soc are different on Ubuntu Linux, but as one professor stated "think of the Windows file names as all uppercase or lower case names. . . ". I have run into this type of limitation with transferring files from my Ubuntu laptop to a NTFS or Fat32 USB flash drive and/or to a Windows format external drive.

Between the /opt/ root system folder[s] and the hidden .config "home" folder [Linux install], I have 11 installed palettes and a few in the works.

While for someone literate in XML, creating a palette in XML is not a big deal, that's not your typical end user. At one point most people created formatted text files by embedding descriptions of the text formatting into the text file. Some still do, but doing it through a GUI like Writer or one of the LaTex front ends is the more usual route.

To create a palette using a text editor you have to research the format and find out where to store the file in addition to knowing the colour codes and names. With a GUI, you just need to know the colour codes and names. Which do you think people are more likely to use?

With a GUI, you just need to know the colour codes and names.

Time yourself creating the Sherwin-Williams Paint Colour Palette.

Which do you think people are more likely to use?

An organisation will hire somebody to construct the colour palette.
An individual that needs new palettes on a regular basis, will learn the
appropriate XML.

jonathon

You're labouring under the delusion that organizations all have budgets to do such things. There are large numbers of organizations that only have a one or a small number of people working on documents. And they will not want to use the savings from not having to pay for LibreOffice to be exceeded by having to hire someone to create a palette.

1) Business Color Palette - should be already know.

If someone in the company created their logo[s], then there should be a record of those colors. If someone created their web site, there should be a record of those colors. How about Business Cards, Fliers, Brochures, Banners, and any other document type, are part of the market branding.  Many times the colors in their palette are already documented, or at least should be.

Go to LibreOffice's Wiki page on marketing and branding.  That page has a lot information about what colors and images are proper to use.  This type of information should be part of the business's marketing documents.

2)  Creating a color palette SOC file.

I am not a "good typist", but if I had a small list of colors - under 20 - including the name and color code, it could take less than 10 minutes by using a small pre-made color palette as the template.  If a person has a sheet of instructions, it could be just as easy for them.

With the list of colors in LibreOffice's branding color list, it should take very little time to make a new color palette file. Even with my typing skills, it should not take even 20 or 30 minutes for the entire process.

3)  No need to hire.

SO, it does not need to hire someone to create the color palette. It could be as easy as a 1 page instructional document, a small palette template file, using Writer or text editor, a list of colors used, and a good typist.

Am I laboring under the delusion, that it can be very easy to do and does not need hired help?  I do not think so.

Just a thought, haven't had a chance to doodle. Using an XSLT XML filter (under Tools) it should be possible to create/edit colour palettes in Calc. Will have a go at modifying one of my custom filters when I have a chance.

Steve

You're labouring under the delusion that organizations all have budgets to do such things.

If an organisation has the budget to create a branding colour palette,
they have the budget to create a soc file for LibreOffice.

If the organisation does not have a branding colour palette, then they
will not need organisation-branding.soc.

And they will not want to use the savings from not having to pay for LibreOffice to be exceeded by having to hire someone to create a palette.

Libre <> Gratis.

jonathon

Is the exporter you are talking about? Is it available as an xpi?

https://design.blog.documentfoundation.org/2017/03/29/libreoffice-extension-export-custom-palette/