Posted on March 18, 2010 at 7:20 am - by Corey DeGrandchamp
Guide: Change iPhone Calendar Colors Manually
WARNING: This guide is NOT for those who are uncomfortable using SSH to manipulate databases on their iPhones!
Will you mess something up? No… probably not, but you can’t come crying to us if you do!
Now, if you’re like me at all, you LOVE Google Calendar, and you use Google Mobile Sync… The sync is great, as it does contacts, gmail, and calendars… However it does not sync over your calendar colors. This is due to two things: There is no place in the Exchange ActiveSync protocol to include colors, and Apple has a terrible bug in their iPhone not allowing any custom/manual colors by default. Even if you use iCal to sync your calendars you’ll have noticed by now that the colors are NOT the same in iCal and on your iPhone.
If you have a lot of calendars, this can become mentally straining trying to memorize two different sets of colors. Not anymore! I’ve figured out how to manually chose those colors on your jailbroken iPhone!
First thing is first, you need to find out what colors you will need. You need RGB vales for this, NOT hexadecimal color codes. I just opened my Google Calendar, took a screenshot, and used a color dropper tool from any random photo manipulation tool to get my RGB values, and I jotted them down on a piece of scrap paper.
At this point you should also make sure SQLite3 is installed on your iPhone, just load up Cydia and search for it, if you’ve got a green check next to it, you’re all set, if not install it, and reboot if required.
Next up you’ll need to SSH into your iPhone. Use your favorite SSH tool to get in, and log in as root. Once you’re in you’ll want to issue these commands.
iPhone:~ root# cd /var/mobile/Library/Calendar/
iPhone:/var/mobile/Library/Calendar root# sqlite3 Calendar.sqlitedb
SQLite version 3.6.12
Enter “.help” for instructions
sqlite> select title,color_r,color_g,color_b from Calendar;
Default|-1|-1|-1
Personal|15|77|140
Work|181|0|13
School|229|98|0
Facebook|103|10|108
Tech Jawa|229|98|0
Tech Jawa Live|181|0|13
Holidays|47|141|0
Once you issue the above commands, you should see your calendar names and their current colors in RGB format. From here we’ll need to update the database to make changes. I made my changes to match my Google Calendar colors exactly, and here’s the commands that I entered, you should do the same, but replace the color values with your own, and obviously replace the titles with the titles of your calendars.
sqlite> update Calendar set color_r=102, color_g=140, color_b=217 where title=’Personal’;
sqlite> update Calendar set color_r=217, color_g=102, color_b=102 where title =’Work’;
sqlite> update Calendar set color_r=101, color_g=173, color_b=137 where title=’School’;
sqlite> update Calendar set color_r=51, color_g=102, color_b=204 where title=’Facebook’;
sqlite> update Calendar set color_r=242, color_g=166, color_b=64 where title=’Tech Jawa’;
sqlite> update Calendar set color_r=140, color_g=102, color_b=217 where title=’Tech Jawa TV’;
sqlite> update Calendar set color_r=221, color_g=85, color_b=17 where title=’Holidays’;
sqlite> select title,color_r,color_g,color_b from Calendar;
Default|-1|-1|-1
Personal|102|140|217
Work|217|102|102
School|101|173|137
Facebook|51|102|204
Tech Jawa|242|166|64
Tech Jawa TV|140|102|217
Holidays|221|85|17
That last command is just to verify your results, and you should be good to go, just open up the Calendar app (or re-open it, if you already had it open) and you should notice your changes. These changes also carry over to calendar based apps from Cydia such as “LockCalendar” and “LockInfo” as well.

Here’s my final results, compare them to the image at the top of the post of my Google Calendar colors.
Just in the case that you screw something up, here’s the original color values if you want them back.
181,0,13 – Red
229,98,0 – Orange
47,141,0 – Green
15,77,140 – Blue
103,10,108 Purple






