Add class to body depending on role of author of user page
This can be achieved by using the template_preprocess_html function in the template.php file of your theme.

function yourtheme_preprocess_html(&amp;$vars) {
  if (arg(0) == 'user' &amp;&amp; is_numeric(arg(1))) {
    $user = user_load((int) arg(1));

    if (in_array('standard', $user-&gt;roles)) {
      $vars['classes_array'][] = 'standard-member';
    }

    if (in_array('premium', $user-&gt;roles)) {
      $vars['classes_array'][] = 'premium-member';
    }
  }
}