How to modify iPhone Calendar colors on Jailbroken iPhone

*EDIT* updated for iOS5 here http://chriscarey.com/wordpress/2012/01/07/changing-calendar-colors-on-a-jailbroken-iphone-running-ios-5/


After installing Google Sync for iPhone, I had a problem that the iPhone Calendar colors did not match the colors of the calendars in Google Calendar.

I am republishing a post by michael.ansel. I found a post by him to be the best way to change calendar colors.

One thing he failed to mention in the following steps is to install sqlite3 which is not installed by default. On your jailbroken iPhone, launch Cydia and install sqlite3.

Then proceed with these steps…

If you have a jailbroken iPhone, you can SSH in and manually modify the colors in the SQLite3 database. Because the colors are stored simply as RGB values, you can also specify any color you want instead of being limited to the standard Red/Orange/Blue/Green/Purple.

Here are my notes for anyone else compelled to do this (its been working wonderfully for me!). One side note, you have to exit Calendar.app and then reopen it to see the color changes. Enjoy!

Disclaimer: If you even think about doing anything contained herein, your dog will die, your girlfriend will leave you, your phone will explode, and I will not be held responsible. I will however be glad to answer politely worded requests for assistance.
###################

[bash]
$ cd /var/mobile/Library/Calendar
$ sqlite3 Calendar.sqlitedb

sqlite> select title,color_r,color_g,color_b from Calendar; — List calendars and current colors
Default|-1|-1|-1
Michael Ansel|181|0|13
School-Important|47|141|0
School-Studying|15|77|140
School-Class|229|98|0

sqlite> update Calendar set color_r=181, color_g=0, color_b=13 where title = ‘School-Important’; — Red
sqlite> update Calendar set color_r=229, color_g=98, color_b=0 where title = ‘School-Studying’; — Orange
sqlite> update Calendar set color_r=103, color_g=10, color_b=108 where title = ‘School-Class’; — Purple
sqlite> update Calendar set color_r=15, color_g=77, color_b=140 where title = ‘Michael Ansel’; — Blue

sqlite> select title,color_r,color_g,color_b from Calendar; — List calendars and current colors
Default|-1|-1|-1
Michael Ansel|15|77|140
School-Important|181|0|13
School-Studying|229|98|0
School-Class|103|10|108

sqlite> .quit

$ exit
[/bash]

###################

RGB Values for the Standard Colors

Red = (181,0,13)
Orange = (229,98,0)
Green = (47,141,0)
Blue = (15,77,140)
Purple = (103,10,108)

———-

Here are the values I use:

sqlite> update Calendar set color_r=181, color_g=0, color_b=13 where title = ‘Important’; — Red
sqlite> update Calendar set color_r=229, color_g=98, color_b=0 where title = ‘Work’; — Orange
sqlite> update Calendar set color_r=47, color_g=141, color_b=64 where title = ‘School’; — Green
sqlite> update Calendar set color_r=196, color_g=168, color_b=131 where title = ‘Health’; — Brown
sqlite> update Calendar set color_r=15, color_g=77, color_b=140 where title = ‘Chris Carey’; — Blue

update Calendar set color_r=181, color_g=0, color_b=13 where title = ‘Important’;
update Calendar set color_r=229, color_g=98, color_b=0 where title = ‘Work’;
update Calendar set color_r=47, color_g=141, color_b=64 where title = ‘School’;
update Calendar set color_r=196, color_g=168, color_b=131 where title = ‘Health’;
update Calendar set color_r=15, color_g=77, color_b=140 where title = ‘Chris Carey’;

14 Replies to “How to modify iPhone Calendar colors on Jailbroken iPhone”

  1. It’s been a year since you’ve posted this, but I just used it to change my iPhone’s calendar colors. I enabled multiple exchange accounts, and it was assigning an exchange account and a CalDAV calendar the same color. I just want to thank you. 🙂

  2. for some reason i can’t get the sqlite working in WinSCP terminal. it times out then aborts when i execute

    sqlite3 Calendar.sqlitedb

    i’ve been searching everywhere for hours now! haven’t had any luck.. pls help!!!

  3. Worked great for me. I needed to switch myself to developer on Cydia and then download the package SQLite 3.x (SQLite 3.x Library is installed by default).

    Colors seem more pastel on iOS 4.1 though.

    Thanks!

  4. Thanks for your tutorial. I currently have several calendars, including some synchronised with Gmail. All the Gmail calendars have the grey colour.

    So I have managed to install openssh, sqlite3, connect to my iphone and do the sql queries to change the colours manually.

    However, it looks like everytime calendar synchronises with Gmail, the gmail calendars’ colour reverts back to the original grey! Does anyone know how I can prevent this?

  5. With the update to ios 5 the schema has changed slightly for the Calendar.sqlitedb file. Instead of using RGB colors (color_r, color_g, color_b), Apple has changed it to use a single hex color called “color”. 🙂

    So an example update query would look something like this:

    update Calendar set color=’#FF0000′ where title = ‘your_calendar_name_here’;

    The above hex color (#FF0000) is a shade of red. To find your favorite color in hex just search in Google for “hex colors”. There are tons of sites that have hex color charts.

Leave a Reply

Your email address will not be published. Required fields are marked *