Skip to content

Instantly share code, notes, and snippets.

@alkrauss48
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alkrauss48/c2533c22acece3aae2ed to your computer and use it in GitHub Desktop.
Save alkrauss48/c2533c22acece3aae2ed to your computer and use it in GitHub Desktop.
Google Calendar Color Map
<?php
// For some reason, when you embed a google calendar, the colors they
// display as background colors for the calendars don't fully match the colors
// that are in the embed code. This is a map from the hexadecimal color codes that
// are in the embed code to what they really render as in the embed
// This will help if you're building a custom legend, for example
$color_map = array(
'A32929' => 'D96666',
'B1365F' => 'E67399',
'7A367A' => 'B373B3',
'5229A3' => '8C66D9',
'29527A' => '668CB3',
'2952A3' => '668CD9',
'1B887A' => '59BFB3',
'28754E' => '65AD89',
'0D7813' => '4CB052',
'528800' => '8CBF40',
'88880E' => 'BFBF4D',
'AB8B00' => 'E0C240',
'BE6D00' => 'F2A640',
'B1440E' => 'E6804D',
'865A5A' => 'BE9494',
'705770' => 'A992A9',
'4E5D6C' => '8997A5',
'5A6986' => '94A2BE',
'4A716C' => '85AAA5',
'6E6E41' => 'A7A77D',
'8D6F47' => 'C4A883',
'853104' => 'C7561E',
'691426' => 'B5515D',
'5C1158' => 'C244AB',
'23164E' => '603F99',
'182C57' => '536CA6',
'060D5E' => '3640AD',
'125A12' => '3C995B',
'2F6213' => '5CA632',
'2F6309' => '7EC225',
'5F6B02' => 'A7B828',
'875509' => 'CF9911',
'8C500B' => 'D47F1E',
'754916' => 'B56414',
'6B3304' => '914D14',
'5B123B' => 'AB2671',
'42104A' => '9643A5',
'113F47' => '4585A3',
'333333' => '737373',
'0F4B38' => '41A587',
'856508' => 'D1BC36',
'711616' => 'AD2D2D'
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment