how do you view the color list in libre?

The TabColor has each letter assigned to a letter, and I’m wondering how do you view what each of these colors look like?

E.g. Thetabcolor 111 in this macro gives you a navy color

Sub Main
oSheet = ThisComponent.getCurrentController.getActiveSheet
oSheet.TabColor = 111
End Sub


the colors are RGB values and there are plenty of RGB calculators on the net (e.g The RGB Color Calculator / Web Page Color Choosing Tool / HTML Color Code Generator)

Another way may be to define a macro, which sets the background color of a cell. The following sample file shows 256 cells in column A having a background according to RGB values from the range [0-255]:


The file has been created using the following macro (also part of the sample file):

Sub SetCellColors()
  Dim oDoc As Object
  Dim oSheet As Object
  Dim oCell As Object
  Dim iCol As Long
  oDoc   = ThisComponent
  oSheet = oDoc.getCurrentController.getActiveSheet 
  iCol = 0
  while iCol < 256
    oCell = oSheet.getCellByPosition(0, iCol + 1)
    oCell.CellBackColor = iCol
    oCell.Value = iCol  
    iCol = iCol +1

End Sub

E.g. Thetabcolor 111 in this macro
gives you a navy color

You can not to name every possible RGB color with a textual name. There are 256x256x256 = 16777216 different colors in the “full” RGB pallette.

The 111 color code means: 0 Red + 0 Green + 111 Blue

The 65535 color code means: 0 Red + 255 Green + 255 Blue = a shade (the “main shade”) of the “cyan”