class SpreadsheetApp method .setFontColor()

SpreadsheetApp is the Apps Script service.

.setFontColor() is the method name you will see after a dot in your code.

What it does

Sets the text color of cells in a range.

Why it's used

  • Flag expired dates or negative balances in red.
  • Match brand colors on auto-generated reports.

Common errors

  • Forgetting parentheses on setFontColor. Write SpreadsheetApp.setFontColor(), not SpreadsheetApp.setFontColor or setFontColor by itself.
  • Skipping dots between chained calls. Each step needs a dot, like SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Data').setFontColor().
  • Adding spaces where they do not belong. Write SpreadsheetApp.setFontColor(), not SpreadsheetApp .setFontColor(), SpreadsheetApp.setFontColor (), or SpreadsheetApp . setFontColor().
  • Wrong capitalization. Use SpreadsheetApp and setFontColor, not spreadsheetapp or setfontcolor.

Explore

Related methods

Better Sheets tutorials

No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.

Related blog posts

Written guides about SpreadsheetApp.setFontColor().

Browse the blog