RGB values in Calc

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

ovi.sergiu gravatar image

updated 2019-04-27 12:47:10 +0100

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

Comments

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 +0100 )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 +0100 )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 +0100 )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 +0100 )edit