<style>
#calendar-grid tr:nth-child(<?php echo $row + 1 ?>) td:nth-child(3){
    background-color: <?php echo $data->color ?>;

    <?php
        if($data->isDarkColor()){
            echo "color: #eee;";
            echo "text-shadow: 0 0 2px #000;";
        }   
        else{
            echo "color: #000;";
            echo "text-shadow: 0 0 2px #fff;";
        } 
    ?>
}
</style>
<?php
    echo $data->color;
?>
