How to change theme colors based on time of day for Adaptivetheme (or other theme that allows user-selectable colors)?
Place the following code into your theme's template.php file.

/**
* Implements template_preprocess_html().
*/
function YOUR_THEME_preprocess_html(&amp;$vars) {
  // Day / night background theming.
  $hour = date('G');
  $theme = 'day';
  if ($hour &lt;= 6) {
    $theme = 'night';
  }
  elseif ($hour &gt;= 6 &amp;&amp; $hour &lt;= 18) {
    $theme = 'day';
  }
  elseif ($hour &gt;= 18) {
    $theme = 'night';
  }
  $vars['classes_array'][] = $theme;
}


Now your &lt;body&gt; tag should have the CSS class 'day' or 'night' depending on the current server time.

An example CSS code would look like:

body.day {
  background: #fff;
  color: #000;
}
body.night {
  background: #000;
  color: #fff;
}


for more info check this tutorial.