if you want to change color regarding ending date
1 create a date field
2 in your item vue edit php and add this whre you want to display it
<?php
$Now = date();
$Date30d = date('Y-m-d', strtotime($Now. ' + 30 days'));
$field_id= XXX, // your flexicontent field idea
$fvals = isset($item->fieldvalues[$field_id]) ? $item->fieldvalues[$field_id] : array();
if(strtotime($fvals[0]) > strtotime($Date30d)){ // $fvals[0] for first value in field
$datecss="green";
}else{
$datecss="red";
}
echo "<span class=\"".$datecss."\">".fvals[0]."</span>";
?>
Now you value have class regarding date field , you can set color via css