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

Brighten Up Your Checklist Automatically

Brighten Up Your Checklist Automatically

Create a cool function that brightens your sheet background from white t...
Create an Internal Google Sheets Add-on

Create an Internal Google Sheets Add-on

The entire process to create and publish a Google Sheets Add-on internal...
Create Your Own NIGHT Mode (like PRIDE)

Create Your Own NIGHT Mode (like PRIDE)

Create easter eggs in your sheets.
Google Maps Scraper for Outreach

Google Maps Scraper for Outreach

Get this fun template to search on google maps via API, and quickly mess...
Visicalc 2023 Design Walkthrough

Visicalc 2023 Design Walkthrough

Design walkthrough of VisiCalc 2023. Watch this if you'd like to see the...
Visicalc 2023 Quick Walkthrough

Visicalc 2023 Quick Walkthrough

This is a fun template I created for April 1st. Take a quick walk throug...

Related blog posts

Written guides about SpreadsheetApp.setFontColor().

Browse the blog