Colors — Google Calendar Simple API documentation (2024)

gcsa allows you to retrieve a list of available calendar and event colors with their ids.

To do so, create a GoogleCalendar instance (see Getting started to get yourcredentials):

from gcsa.google_calendar import GoogleCalendargc = GoogleCalendar()

Note

Google’s API always returns “classic” colors.

They are always the same, so you can just use IDs from the tables bellow.

You can choose between “classic” and “modern” color sets in the UI. Color names and IDs are the same,but the colors are different (see the tables bellow).

Event colors

List event colors

for color_id, color in gc.list_event_colors().items(): bg = color['background'] fg = color['foreground'] print(color_id, f'{bg=}, {fg=}')
Event colors

Color ID

Name

Classic

Modern

‘1’

Lavender

#A4BDFC

#7986CB

‘2’

Sage

#7AE7BF

#33B679

‘3’

Grape

#DBADFF

#8E24AA

‘4’

Flamingo

#FF887C

#E67C73

‘5’

Banana

#FBD75B

#F6BF26

‘6’

Tangerine

#FFB878

#F4511E

‘7’

Peaco*ck

#46D6DB

#039BE5

‘8’

Graphite

#E1E1E1

#616161

‘9’

Blueberry

#5484ED

#3F51B5

‘10’

Basil

#51B749

#0B8043

‘11’

Tomato

#DC2127

#D50000

None

Color of the calendar

Set event color

Use color ID in Event’s color_id field:

from gcsa.event import EventFLAMINGO_COLOR_ID = '4'event = Event('Important!', start=start, color_id=FLAMINGO_COLOR_ID)event = gc.add_event(event)

Update event color

FLAMINGO_COLOR_ID = '4'event.color_id = FLAMINGO_COLOR_IDgc.update_event(event)

Calendar colors

Note

Color is a property of a calendar list entry, not a calendar itself (see the difference in Calendars and Calendar list).Unlike events’ colors, you can use either the color ID or hex values to set a color for a calendar list entry.If you use hex values (they are not limited to values from the table bellow), value of the color ID will beset automatically to the best matching option.

List calendar colors

for color_id, color in gc.list_calendar_colors().items(): bg = color['background'] fg = color['foreground'] print(color_id, f'{bg=}, {fg=}')
Calendar colors

Color ID

Name

Classic

Modern

‘1’

Cocoa

#AC725E

#795548

‘2’

Flamingo

#D06B64

#E67C73

‘3’

Tomato

#F83A22

#D50000

‘4’

Tangerine

#FA573C

#F4511E

‘5’

Pumpkin

#FF7537

#EF6C00

‘6’

Mango

#FFAD46

#F09300

‘7’

Eucalyptus

#42D692

#009688

‘8’

Basil

#16A765

#0B8043

‘9’

Pistachio

#7BD148

#7CB342

‘10’

Avocado

#B3DC6C

#C0CA33

‘11’

Citron

#FBE983

#E4C441

‘12’

Banana

#FAD165

#F6BF26

‘13’

Sage

#92E1C0

#33B679

‘14’

Peaco*ck

#9FE1E7

#039BE5

‘15’

Cobalt

#9FC6E7

#4285F4

‘16’

Blueberry

#4986E7

#3F51B5

‘17’

Lavender

#9A9CFF

#7986CB

‘18’

Wisteria

#B99AFF

#B39DDB

‘19’

Graphite

#C2C2C2

#616161

‘20’

Birch

#CABDBF

#A79B8E

‘21’

Radicchio

#CCA6AC

#AD1457

‘22’

Cherry Blossom

#F691B2

#D81B60

‘23’

Grape

#CD74E6

#8E24AA

‘24’

Amethyst

#A47AE2

#9E69AF

Set calendar list entry color

Use color ID in CalendarListEntry’s color_id field or hex values in background_color andforeground_color:

  1. Get a calendar list entry

calendar_list_entry = gc.get_calendar_list_entry('<calendar_id>')
  1. Set a new color ID

GRAPHITE_COLOR_ID = '19'calendar_list_entry.color_id = GRAPHITE_COLOR_ID

or set hex values of background_color and foreground_color:

calendar_list_entry.background_color = "#626364"calendar_list_entry.foreground_color = "#FFFFFF"
  1. Update calendar list entry:

calendar_list_entry = gc.update_calendar_list_entry(calendar_list_entry)
Colors — Google Calendar Simple API  documentation (2024)

FAQs

Colors — Google Calendar Simple API documentation? ›

On your computer, open Google Calendar. On the left, click More insights . Tip: You can also add or edit color labels below the Time breakdown chart.

Is there a way to color code Google Calendar? ›

On your computer, open Google Calendar. On the left, click More insights . Tip: You can also add or edit color labels below the Time breakdown chart.

How to make custom colors in Google Calendar? ›

Calendar: Color-coding
  1. On the left under My calendars, point to the calendar.
  2. Click More and select a color or click Add to choose a custom color.

What is the Google Calendar API? ›

Google Calendar Simple API or gcsa is a library that simplifies event and calendar management in Google Calendars.

How to use Google Calendar API Postman? ›

To use the Google Calendar API, an OAuth 2.0 token is necessary:
  1. Google Developer Console: Access the Google Developer Console, create a new project, and enable the Google Calendar API.
  2. OAuth Consent Screen: Set up the OAuth consent screen with the appropriate scopes.
  3. Credentials: Generate credentials (OAuth client ID).
Jan 1, 2024

What happened to Google Calendar color coding? ›

Hi Jennifer, colour coding has not been removed. Most likely the Google Calendar app has switched to using a different calendar (e.g the Samsung "Events" calendar) which doesn't show colour coding, maybe after a system update.

Can you change Google Calendar color palette? ›

How to change Google Calendar colors on Android. Open the Google Calendar mobile app. Tap the three horizontal lines on the top left corner.

Can you download more colors for Google Calendar? ›

A Chrome extension designed to enhance and personalize your Google Calendar experience. Currently allows you to have full control of your Google Calendar events with custom colors. Add new colors to your palette in the extensions popup menu to see more color options in your calendar!

How to personalize a Google Calendar? ›

Change your calendar spacing and color set
  1. On your computer, open Google Calendar.
  2. In the top right, click Settings. Density and color.
  3. Choose Responsive to your screen or Compact. Compact has narrower borders and spaces. ...
  4. To change color sets, choose Modern or Classic.

Can you filter by color in Google Calendar? ›

Calendar Filters: You can specify any custom filter that allows items to only sync if it meets a certain criteria. Color Coded: You can have certain activities be synced different colors.

What is the limitation of Google Calendar API? ›

The Calendar API has a limit of 1,000,000 queries per day. If you want to change your usage limits or increase your quota, take the following steps: Create a billing account if you haven't got one. Go to the Enabled APIs page of the API library in the Google Console and choose an API from the list.

Is Google Calendar API completely free? ›

All use of the Google Calendar API is available at no additional cost.

Are Google APIs free? ›

All use of Google Search Console API is free of charge. However, it is subject to usage limits. Was this helpful? Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License.

How do I query Google Calendar API? ›

Go to the Google Developer Console and create a new project (it might take a second). Once in the project, go to APIs & auth > APIs on the sidebar. Find “Calendar API” in the list and turn it ON. On the sidebar, click APIs & auth > Credentials.

Is Google Calendar a REST API? ›

The Google Calendar API is a RESTful API that can be accessed through explicit HTTP calls or using the Google Client Libraries.

How do I create a Google Calendar API key? ›

Create an API key
  1. In the Google Cloud console, go to Menu menu > APIs & Services > Credentials. Go to Credentials.
  2. Click Create credentials > API key.
  3. Your new API key is displayed. Click Copy content_copy to copy your API key for use in your app's code.

How do I change the hex code in Google Calendar? ›

Change your calendar's color schemes by clicking the three dots next to each calendar under “My calendars.” You can choose from 24 standard colors, or you can click the + icon to pick a custom HEX color. This color will be applied to all events in the calendar.

Why is my shared Google Calendar not color coded? ›

Color coding is private to you and anybody who can edit your calendar. People with whom you share your calendar will not be able to see the colors you've assigned to events unless you give them “Makes changes and manage to share” rights to your calendar.

How do I add more colors to Google Calendar on my iPhone? ›

Assign a color label to an event
  1. On your device, open the Google Calendar app .
  2. Create a new event or tap on an existing event.
  3. Tap Edit .
  4. Near the bottom, select your current calendar color.
  5. Select an existing color label.
  6. Tap Save.

Top Articles
How to Download Apple Music for Windows 11
Best Offline Music Players for Windows 11
Muk Chalinee
Hub.vacation Club.com
Wnem Radar
Lc Auto Sales Irving
Lesson 10 Homework 5.3
Pobierz Papa's Mocharia To Go! na PC za pomocą MEmu
Evil Dead Rise Showtimes Near Amc Antioch 8
What to see and do in Spokane, Washington
Tacos Diego Hugoton Ks
92801 Sales Tax
โลโก้โภชนาการที่ดีที่สุด: สัญลักษณ์แห่งความเป็นเลิศ
Texas (TX) Lottery - Winning Numbers & Results
Join MileSplit to get access to the latest news, films, and events!
Metalico Sharon Pa
라이키 유출
Bootyandthebeast69 Swap
Cherry Crush Webtoon Summary
Uc My Bearcat Network
Gina's Pizza Port Charlotte Fl
Wbap Iheart
Kawasaki Ninja® 500 | Motorcycle | Approachable Power
The Real-Life Woman That Inspired Japanese Horror Classic Ring - SlashFilm
Scrap Metal Prices in Indiana, Pennsylvania Scrap Price Index,United States Scrap Yards
Slmd Skincare Appointment
Laura Coates Parents Nationality
Daves Supermarket Weekly Ad
Baycare Intranet
Mark Rosen announces his departure from WCCO-TV after 50-year career
Ixl.prentiss
Palmer Santin Funeral Home Fullerton Nebraska Obituaries
Aka.ms/Compliancelock
Nickelodeon Home Media
Dutchessravenna N Word
Shaleback Hollow Location
Bank Of America Financial Center Irvington Photos
Anker GaNPrime™️ | Our Best Multi-Device Fast Charging Lineup
100X35 Puerto Rico Meaning
Demetrius Meach Nicole Zavala
The QWERTY Keyboard Is Tech's Biggest Unsolved Mystery
Tcu Jaggaer
Tani Ahrefs
Coventry Evening Telegraph Ccfc
Farmers Branch Isd Calendar
Sam's Club Gas Price Mechanicsburg Pa
Ace Adventure Resort Discount Code 2023
Zmeenaorrxclusive
Meggen Nut
Erfolgsfaktor Partnernetzwerk: 5 Gründe, die überzeugen | SoftwareOne Blog
Ixl Scarsdale
Latest Posts
Article information

Author: Lakeisha Bayer VM

Last Updated:

Views: 6483

Rating: 4.9 / 5 (49 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Lakeisha Bayer VM

Birthday: 1997-10-17

Address: Suite 835 34136 Adrian Mountains, Floydton, UT 81036

Phone: +3571527672278

Job: Manufacturing Agent

Hobby: Skimboarding, Photography, Roller skating, Knife making, Paintball, Embroidery, Gunsmithing

Introduction: My name is Lakeisha Bayer VM, I am a brainy, kind, enchanting, healthy, lovely, clean, witty person who loves writing and wants to share my knowledge and understanding with you.