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’;


Posted

in

by

Tags:

Comments

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

  1. […] Exchange helaas niet. Voor ge-jailbreak-te iPhones schijn je dat zelf alsnog te kunnen regelen: How to modify iPhone Calendar colors with sqlite3 Chris Carey Helaas heb ik FW3.1 en de nieuwste baseband op mijn iPhone dus een JB zit er (voorlopig?) niet […]

  2. Rondhi Avatar
    Rondhi

    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. 🙂

  3. Dirk Avatar
    Dirk

    Thanks a lot! Works fine!

  4. Mel Avatar
    Mel

    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!!!

    1. Chris Carey Avatar

      Try using putty instead of winscp

  5. Ryan Harper Avatar
    Ryan Harper

    Thank you! I just used this trick to change the colors on my newly jailbroken iphone 4. Worked like a charm!

  6. Marc Troy Avatar

    Thank you! Worked perfectly on my iPad.

  7. […] iPhone jailbreaken en dan deze methode toepassen: How to modify iPhone Calendar colors on Jailbroken iPhone Andere werkende oplossingen voor Exchange heb ik nog niet gezien (o.a. omdat het door Exchange […]

  8. Michael Goll Avatar
    Michael Goll

    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!

  9. […] This one came about as I was recently forced at work to switch from using the Unix email system to the hosted Exchange solution, in order for our calendars to be centrally accessible by everyone. Details aside, after adding my exchange to my iPhone (since I am trying to keep my blackberry off BES), I realized that the color schemes absolutely suck. From somewhere, it decided that purple was the best color, and I couldn’t change it. After aimlessly searching through the Calendar.app on the iPhone for a color changing option, I came to the realization that there was no way to do it. Luckily, my iphone was jailbroken, and there are plenty of ways to do this with a little background work. I found this amazing article: http://chriscarey.com/wordpress/2009/02/10/how-to-modify-iphone-calendar-colors-with-sqlite3/ […]

  10. Damien Avatar
    Damien

    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?

  11. Tim Avatar
    Tim

    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.

    1. Chris Carey Avatar

      Yeah I noticed that just the other day but haven’t had time to blog it yet. Thanks for that info rockstarTS!

Leave a Reply

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