I got it done. I made a tiny macro by taking bits of other people’s code. In case it is of use to anyone else, here it is.
sub setcolor
mycell = thisComponent.getcurrentselection() 'C1 - target cell whose color would be changed
mycelladdr = mycell.getcelladdress()
r1 = mycell.getspreadsheet().getcellbyposition(mycelladdr.column-3,mycelladdr.row).value 'red value is in 3rd column to the left
g1 = mycell.getspreadsheet().getcellbyposition(mycelladdr.column-2,mycelladdr.row).value 'green value is in 2nd column to the left
b1 = mycell.getspreadsheet().getcellbyposition(mycelladdr.column-1,mycelladdr.row).value 'blue calue is in 1st coolumn to the left
mycell.CellBackColor = rgb(r1,g1,b1)
End Sub
Then I just highlight the cell to the right of the three cells containing the RBG values and run the macro.
Cheers,
Jim