+#block out / show / color code existing appointments
+foreach my $id ( keys %{ $schedule{'scheduled'} } ) {
+
+ my( $starts, $due, $col, $t ) = @{ $schedule{'scheduled'}->{$id} };
+ my $color = $im->colorAllocate( unpack 'C*', pack 'H*', $col );
+ $im->filledRectangle( int(($starts-$stime)/10), 1, int(($due-$stime)/10)-1, $height-2, $color );
+
+}