{"id":353,"date":"2009-02-10T14:25:19","date_gmt":"2009-02-10T21:25:19","guid":{"rendered":"http:\/\/chriscarey.com\/blog\/?p=353"},"modified":"2012-02-09T17:16:20","modified_gmt":"2012-02-10T00:16:20","slug":"how-to-modify-iphone-calendar-colors-with-sqlite3","status":"publish","type":"post","link":"https:\/\/chriscarey.com\/blog\/2009\/02\/10\/how-to-modify-iphone-calendar-colors-with-sqlite3\/","title":{"rendered":"How to modify iPhone Calendar colors on Jailbroken iPhone"},"content":{"rendered":"<p>*EDIT* updated for iOS5 here <a href=\"http:\/\/chriscarey.com\/wordpress\/2012\/01\/07\/changing-calendar-colors-on-a-jailbroken-iphone-running-ios-5\/\" >http:\/\/chriscarey.com\/wordpress\/2012\/01\/07\/changing-calendar-colors-on-a-jailbroken-iphone-running-ios-5\/<\/a><\/p>\n<hr \/>\n<p>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.<\/p>\n<p>I am republishing a post by <a class=\"lCSS\" href=\"http:\/\/www.google.com\/support\/forum\/p\/Google%20Mobile\/user?userid=06411724200391112306&amp;hl=en\">michael.ansel<\/a>. I found a post by him to be the best way to change calendar colors.<\/p>\n<p>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 <strong>sqlite3<\/strong>.<\/p>\n<p>Then proceed with these steps&#8230;<\/p>\n<p><!--more-->&#8212;<\/p>\n<p>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.<\/p>\n<p>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!<\/p>\n<p>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.<br \/>\n###################<\/p>\n<p>[bash]<br \/>\n$ cd \/var\/mobile\/Library\/Calendar<br \/>\n$ sqlite3 Calendar.sqlitedb<\/p>\n<p>sqlite&gt; select title,color_r,color_g,color_b from Calendar; &#8212; List calendars and current colors<br \/>\nDefault|-1|-1|-1<br \/>\nMichael Ansel|181|0|13<br \/>\nSchool-Important|47|141|0<br \/>\nSchool-Studying|15|77|140<br \/>\nSchool-Class|229|98|0<\/p>\n<p>sqlite&gt; update Calendar set color_r=181, color_g=0, color_b=13 where title = &#8216;School-Important&#8217;; &#8212; Red<br \/>\nsqlite&gt; update Calendar set color_r=229, color_g=98, color_b=0 where title = &#8216;School-Studying&#8217;; &#8212; Orange<br \/>\nsqlite&gt; update Calendar set color_r=103, color_g=10, color_b=108 where title = &#8216;School-Class&#8217;; &#8212; Purple<br \/>\nsqlite&gt; update Calendar set color_r=15, color_g=77, color_b=140 where title = &#8216;Michael Ansel&#8217;; &#8212; Blue<\/p>\n<p>sqlite&gt; select title,color_r,color_g,color_b from Calendar; &#8212; List calendars and current colors<br \/>\nDefault|-1|-1|-1<br \/>\nMichael Ansel|15|77|140<br \/>\nSchool-Important|181|0|13<br \/>\nSchool-Studying|229|98|0<br \/>\nSchool-Class|103|10|108<\/p>\n<p>sqlite&gt; .quit<\/p>\n<p>$ exit<br \/>\n[\/bash]<\/p>\n<p>###################<\/p>\n<p>RGB Values for the Standard Colors<\/p>\n<p>Red = (181,0,13)<br \/>\nOrange = (229,98,0)<br \/>\nGreen = (47,141,0)<br \/>\nBlue = (15,77,140)<br \/>\nPurple = (103,10,108)<\/p>\n<p>&#8212;&#8212;&#8212;-<br \/>\n<\/code><\/p>\n<p>Here are the values I use:<\/p>\n<p>sqlite> update Calendar set color_r=181, color_g=0, color_b=13 where title = &#8216;Important&#8217;; \u2014 Red<br \/>\nsqlite> update Calendar set color_r=229, color_g=98, color_b=0 where title = &#8216;Work&#8217;; \u2014 Orange<br \/>\nsqlite> update Calendar set color_r=47, color_g=141, color_b=64 where title = &#8216;School&#8217;; \u2014 Green<br \/>\nsqlite> update Calendar set color_r=196, color_g=168, color_b=131 where title = &#8216;Health&#8217;; \u2014 Brown<br \/>\nsqlite> update Calendar set color_r=15, color_g=77, color_b=140 where title = &#8216;Chris Carey&#8217;; \u2014 Blue<\/p>\n<p>update Calendar set color_r=181, color_g=0, color_b=13 where title = &#8216;Important&#8217;;<br \/>\nupdate Calendar set color_r=229, color_g=98, color_b=0 where title = &#8216;Work&#8217;;<br \/>\nupdate Calendar set color_r=47, color_g=141, color_b=64 where title = &#8216;School&#8217;;<br \/>\nupdate Calendar set color_r=196, color_g=168, color_b=131 where title = &#8216;Health&#8217;;<br \/>\nupdate Calendar set color_r=15, color_g=77, color_b=140 where title = &#8216;Chris Carey&#8217;;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>*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 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5],"tags":[56],"class_list":["post-353","post","type-post","status-publish","format-standard","hentry","category-iphone","tag-iphone"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/prpYG-5H","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/chriscarey.com\/blog\/wp-json\/wp\/v2\/posts\/353","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chriscarey.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chriscarey.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chriscarey.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/chriscarey.com\/blog\/wp-json\/wp\/v2\/comments?post=353"}],"version-history":[{"count":18,"href":"https:\/\/chriscarey.com\/blog\/wp-json\/wp\/v2\/posts\/353\/revisions"}],"predecessor-version":[{"id":843,"href":"https:\/\/chriscarey.com\/blog\/wp-json\/wp\/v2\/posts\/353\/revisions\/843"}],"wp:attachment":[{"href":"https:\/\/chriscarey.com\/blog\/wp-json\/wp\/v2\/media?parent=353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chriscarey.com\/blog\/wp-json\/wp\/v2\/categories?post=353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chriscarey.com\/blog\/wp-json\/wp\/v2\/tags?post=353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}