Bug 163535 - Update default Chart color palette (chart-palettes.soc)
Summary: Update default Chart color palette (chart-palettes.soc)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
24.8.2.1 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillDesign
Depends on:
Blocks: Chart Chart-Enhancements
  Show dependency treegraph
 
Reported: 2024-10-19 15:35 UTC by Eyal Rozenberg
Modified: 2024-11-07 07:24 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Spreadsheet with chart using all default color palette colors (23.91 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-10-19 15:44 UTC, Eyal Rozenberg
Details
Chart image from spreadsheet in attachment 197153 (34.59 KB, image/png)
2024-10-19 15:45 UTC, Eyal Rozenberg
Details
Rainbow palette (6.07 KB, image/png)
2024-10-21 11:58 UTC, Heiko Tietze
Details
MS Excel charts' first 8 colors (and other stuff) (8.02 KB, image/webp)
2024-10-21 20:53 UTC, Eyal Rozenberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2024-10-19 15:35:16 UTC
This is the default color palette for charts (or chart area fill color), encoded in RGB:

0x004586 0xff420e 0xffd320 0x579d1c 0x7e0021 0x83caff 0x314004 0xaecf00 0x4b1f6f 0xff950e 0xc5000b 0x0084d

see also the soon-to-be-attached spreadsheet and chart.

Now:

* The blue and purple are relatively close together, for darker colors, and are not easy enough to distinguish IMHO, epdeically when considering the legend,
* There are mostly "darker" colors, less lighter ones (e.g. orange and faded-blue).
* Many "famous" colors are not used; which in itself is ok, but I suspect the coverage of the space of possible colors is poor. Just adding, say, some shade of pink could have been nice and would have been quite distinguishable from the other colors (not to mention possiblitiess for replacing an existing color).
* They yellow and organge are a bit little too close to each other; and so are the dark green and the dark reddish-mauve (0x579d1c), especially in the legend.

So, I suggest the default palette be tweaked for better "distinguishability".

PS - I know that different people's color perception is different. I'm not diaganosed with any problem in this respect, but I still realize my complaints may be somewhat subjective.
Comment 1 Eyal Rozenberg 2024-10-19 15:44:39 UTC
Created attachment 197153 [details]
Spreadsheet with chart using all default color palette colors

This is an ODS with a table and an associated chart, using all default color palette colors and with their RGB codes as categories.
Comment 2 Eyal Rozenberg 2024-10-19 15:45:47 UTC
Created attachment 197154 [details]
Chart image from spreadsheet in attachment 197153 [details]

Just the chart, export as an image.
Comment 3 V Stuart Foote 2024-10-19 18:23:39 UTC
Those chart colors are defined in chart-palettes.soc [1] last touched at the 6.0 release.

If any reshuffle/adjustment it would be helpful if any revised chart colors are taken from named generated RGB the standard.soc palette. 

And, curious if implementing 12-color theme support (i.e. Format -> Theme) might be in the works for charts? Seems like mso provides an entire chart-themes design framework to complement document themes.

=-ref-=
[1] https://opengrok.libreoffice.org/xref/core/extras/source/palettes/chart-palettes.soc?r=ab60361f
Comment 4 Eyal Rozenberg 2024-10-19 18:59:11 UTC
(In reply to V Stuart Foote from comment #3)
> If any reshuffle/adjustment it would be helpful if any revised chart colors
> are taken from named generated RGB the standard.soc palette. 

I think that might be too limiting in optimizing the choice of colors for best contrast.


> And, curious if implementing 12-color theme support (i.e. Format -> Theme)
> might be in the works for charts? Seems like mso provides an entire
> chart-themes design framework to complement document themes.

I'm sure we have a bug open somewhere about creating Chart Styles, I just can't find it... anyway, this bug would just be a small hack given the way things are right now.
Comment 5 V Stuart Foote 2024-10-19 20:10:40 UTC
Chart styles is bug 62925, but a dupe 90490 had addressed both color theme and chart styles and a SB deck for it.

See attachment 118876 [details] from bug 90490, not too much has changed other than now more complete handling of MS style document themes.
Comment 6 Heiko Tietze 2024-10-21 11:58:35 UTC
Created attachment 197172 [details]
Rainbow palette

The palette just allows to name colors, the definition is done in officecfg/registry/schema/org/openoffice/Office/Chart.xcs. It was changed for some reason with https://github.com/LibreOffice/core/commit/5f4256e2e33d64465fa37821f05868157ca45f7a

I could imagine that these colors are close to the set from competitors. But I would proudly use a different set. Perhaps something close to R's rainbow

> rainbow(11)

 [1] "#FF0000" "#FF8B00" "#E8FF00" "#5DFF00" "#00FF2E" "#00FFB9" "#00B9FF"
 [8] "#002EFF" "#5D00FF" "#E800FF" "#FF008B"
Comment 7 V Stuart Foote 2024-10-21 12:27:57 UTC
(In reply to Heiko Tietze from comment #6)
> ...
> The palette just allows to name colors, the definition is done in
> officecfg/registry/schema/org/openoffice/Office/Chart.xcs. 
> ...
> 
> I could imagine that these colors are close to the set from competitors. But
> I would proudly use a different set. Perhaps something close to R's rainbow
> 
> > rainbow(11)
> 
>  [1] "#FF0000" "#FF8B00" "#E8FF00" "#5DFF00" "#00FF2E" "#00FFB9" "#00B9FF"
>  [8] "#002EFF" "#5D00FF" "#E800FF" "#FF008B"

We'd need 12.

As to format in the .xcs, seems past time for chart's RGB notation to be shifted from the integer to hex notation as we've done elsewhere.

The values do match the listing in the palette .soc:

<snip>
<value>17798 16728590 16765728 5741852 8257569 8637183 3227652 11456256 4923247 16749838 12910603 34001</value>
<!-- 0x004586 0xff420e 0xffd320 0x579d1c 0x7e0021 0x83caff 0x314004 0xaecf00 0x4b1f6f 0xff950e 0xc5000b 0x0084d1 -->
</snip>
Comment 8 Eyal Rozenberg 2024-10-21 20:51:17 UTC
(In reply to Heiko Tietze from comment #6)
> Rainbow palette

So, first, what Stuart said (we need at least 12).

Also - these are well-distinguishable; but your particular choices are also very "garish" - maximum saturation. Contrast that with Excel's first 8 colors (which I'll soon attach).
Comment 9 Eyal Rozenberg 2024-10-21 20:53:37 UTC
Created attachment 197185 [details]
MS Excel charts' first 8 colors (and other stuff)

Note that Excel has a pair of similar colors in its first eight: Light-ish blue and somewhat-but-not-very-much-darker blue.
Comment 10 Heiko Tietze 2024-10-22 07:27:23 UTC
(In reply to Eyal Rozenberg from comment #9)
> MS Excel charts' first 8 colors (and other stuff)
Charts created with Excel are easy to recognize due to the distinguished colors. For marketing reasons, I would implement a default that is clearly different but also appealing and unique.
Comment 11 Eyal Rozenberg 2024-10-22 08:40:13 UTC
(In reply to Heiko Tietze from comment #10)
> (In reply to Eyal Rozenberg from comment #9)
> For marketing reasons, I would implement a default that is clearly
> different

Yes, I didn't mean to suggest we copy Excel's theme, it's just anoterh data point to think about.

OTOH, color palettes don't need to be that "unique". I mean, a rainbow-ish palette for things is not uncommon.
Comment 12 Heiko Tietze 2024-11-07 07:24:21 UTC
We discussed the topic in the design meeting.

The current colors are not really aesthetic but OTOH it's a matter of taste and easy to change. We have no good alternative at hand and decided to keep the ticket for actual proposals.

Goal is to provide unique colors, easy to recognize, and to distinguish.