Color

Google Sheets: Apps Script Color

Get the cell hex background color

function BGHEX(row, column) {
  var background = SpreadsheetApp.getActive().getDataRange().getCell(row, column).getBackground();
  return background;
}
=BGHEX(ROW(A1), COLUMN(A1))

Reference