Custom node color from role
UPDATE From the code you've added it looks like you want to add the class based on the node author. You can use much the same principle:

function MYTHEME_preprocess_node(&amp;$vars) {
  $account = user_load($vars['node']-&gt;uid);

  foreach ($account-&gt;roles as $role) {
    $vars['classes_array'][] = 'role-' . strtolower(str_replace(' ', '-', $role));
  }
}


Each node will have the role-rolename classes added to it (see original answer below).

ORIGINAL ANSWER

Quick and easy way:

function MYTHEME_preprocess_html(&amp;$vars) {
  global $user;

  // Loop over the user's roles and add a class to the body class array.
  foreach ($user-&gt;roles as $role) {
    $vars['classes_array'][] = 'role-' . strtolower(str_replace(' ', '-', $role));
  }
}


That adds classes like role-administrator and role-authenticated-user (and any other roles the user has) to the &lt;body&gt; tag. From there you should be able to target things easily with CSS (e.g. body.role-manager{background:red}).

Remember to clear Drupal's caches after you've added the preprocess function, or the changes won't get picked up.