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

Ask Your Question

RGB values in Calc

asked 2019-04-27 12:46:51 +0200

ovi.sergiu gravatar image

updated 2020-07-21 20:01:11 +0200

Alex Kemp gravatar image

In a LibreOffice Calc sheet I have entered manually some numbers (RGB values), each value in a different cell, horizontally.

What I need is: What formula should I type/use in order to get an actual colored cell with the RGB values type in the previous cells?

Thank you! C:\fakepath\rgb-cells.ods

edit retag flag offensive close merge delete


From my point of view there is no such formula and you even cannot write your own function (!!!) to achieve your goal, since as far as I understand functions are not allowed to change the sheet from where they are called (see also answer from Andrew at https://stackoverflow.com/questions/12089051/changing-cell-background-color-in-libreoffice)

Opaque gravatar imageOpaque ( 2019-04-27 13:43:22 +0200 )edit

Thank you @Opaque. I also found a topic after posting my question, but I do not know where and how to put the code suggested by arindam in this topic I mentioned: https://ask.libreoffice.org/en/questi...

ovi.sergiu gravatar imageovi.sergiu ( 2019-04-27 13:48:26 +0200 )edit

Hello - check out for Tools -> Macros -> Edit Macros - that's the place, where these subroutines (and functions) go to and afterwards you may assign it to some toolbar or you create a simple button within your sheet.

Opaque gravatar imageOpaque ( 2019-04-27 13:57:34 +0200 )edit

For a long time now the restrictions concerning side-effects of user functions were weakened. You can set the .String and the .Value property, and also .Formula e.g.
However, the setting of many other properties is still prohibited (without throwing an error) and I don't know any specification insofar. We have to expect changes without notice, and should therefore not rely on side-effects afflicting cells in the same sheet from where the user function was called.
See also: https://bugs.documentfoundation.org/s...

Lupp gravatar imageLupp ( 2019-04-27 16:34:54 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2020-02-18 11:10:46 +0200

ChameleonScales gravatar image
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-04-27 12:46:51 +0200

Seen: 534 times

Last updated: Feb 18 '20