We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question

What colors can be used in formulas

asked 2018-09-04 13:00:27 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I think this ought to be a simple question, but it isn't. I've done dozens of web searches, and searched the forum, and can't find the answer.

I want to highlight numbers in certain columns based on positive or negative. That much is simple:


in "Format Cells" makes positive numbers blue and negative numbers red. But the blue doesn't stand out as much as I need.

This also works:


but the green is too light and is difficult to read. So I tried this:


This does not work, even though the color table that shows up when I click on the Font Color icon includes Violet.

I can't find a list anywhere that says what colors will work in this type of cell format. This ought to be somewhere in the documentation, but for reasons I can't even guess it appears to be deeply hidden. I can't find it anywhere in the documentation, nor in this forum.

There are many entries that talk about using embedded code to define colors, or how to change background colors, or other color-related topics: but nothing I can find gives the list of pre-defined colors that will work to format numbers in a cell.

Could someone please tell me what the list is, or where to find it, or how to get other colors to work?

edit retag flag offensive close merge delete


I played around a bit. It looks like only the basic colors are supported: RED, GREEN, BLUE, YELLOW, CYAN and MAGENTA.

ebot gravatar imageebot ( 2018-09-04 13:35:52 +0200 )edit

To find the "deeply hidden" topic, one could go one of these ways: from Calc's Format Cell dialog, click Help → in the opened Numbers/Format help page, click Number format codes in Related Topics in the bottom of the page. Or from StarBasic help, one could find Format function help, and then again, open the link in Related Topics.

Mike Kaganski gravatar imageMike Kaganski ( 2018-09-04 15:46:48 +0200 )edit

3 Answers

Sort by » oldest newest most voted

answered 2018-09-04 15:40:06 +0200

The supproted names are listed in the Number Format Codes topic in LibreOffice help.

edit flag offensive delete link more

answered 2020-09-02 23:34:45 +0200

uihdhhnq gravatar image

OK, this a year old response but I've was trying to also find an alternative green to [GREEN] when plugged into fromat code field.

It seems there is half support for more than the basics listed at libre office help docs under format code - color CYAN, GREEN, BLACK, BLUE, MAGENTA, RED, WHITE and YELLOW.

Seems there are some collors you can use from 00 to 20+ maybe. For example [COLOR23] gives me a nice readable green.

* OK UPDATE, [COLOR##] ## being 00 up to 20+.. works only for the session. If I save/close then reopen the calc file, the userdefined format code is not saved. If I plug it and save, it desplays fine until I close the file.

edit flag offensive delete link more


In fact, 1 to 64.

Mike Kaganski gravatar imageMike Kaganski ( 2020-09-03 09:35:23 +0200 )edit

answered 2018-09-05 13:07:10 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Thanks for the pointers. I don't know why none of this showed up in my web searches. I did suspect that only the primary colors would work, but could not find it documented anywhere.

Do you think it would be asking too much to request that additional colors be supported? How does one go about making such a request?

edit flag offensive delete link more


(Your "answer" should be a comment to the real answer.)
I also would like to see more color options. I think there's no open bug yet. I found a meta-bug titled ”Number format bugs and enhancements“. Take a look at its dependency tree.

user4657 gravatar imageuser4657 ( 2020-04-20 14:41:20 +0200 )edit
Login/Signup to Answer

Question Tools



Asked: 2018-09-04 13:00:27 +0200

Seen: 2,495 times

Last updated: Sep 02 '20