Change colors of account I have created a field(select list) with some colors. I want to let my site users choose the color (color of menus, blocks ...) of their account.

How can I do this?
In my example I will assume that you have a color field called color (machine name: field_color) already set to user fields admin/config/people/accounts/fields

By following these steps you'll be able to achieve what are you looking for.


Create Drupal custom module. Ref Creating modules.
Implement hook_init to your custom module
In the hook_init you need to implement drupal_add_css 
Set HTML elements you need to let users to change; according to current user color selection.
The final code should look like the following:




function MODULE_NAME_init() {
  global $user;
  $account = user_load($user-&gt;uid);

  if(isset($account-&gt;field_color['und'])) {
    $color = $account-&gt;field_color['und'][0]['value'];

    drupal_add_css(t('#menu { background-color: #@color; }', array('@color' =&gt; $color)), array(
      'type' =&gt; 'inline',
      'media' =&gt; 'screen',
      'weight' =&gt; '10000',  
    ));
  }
}


Note: change MODULE_NAME to your desirable module name.