Getting values from options page to css

You are doing it correctly. I would suggest two enhancements:

  1. Do not put this code directly in header.php. Create a custom function to print the css and hook this into the wp_head action.
  2. Always sanitize/escape input before you print it to the screen. Look into ctype_xdigit() for creating a custom function to sanitize you color value.