title: Converting hex value from string to hext color code
body: <p>In Objective-C xcode project I have a plist file with which associates integers with hex-color codes. Dynamically I want to use this color-code from plist file and pass that hex value to the following macro to get the <code>UIColor</code> object.</p>
  
  <p><strong>Macro:</strong></p>
  
  <pre><code>#define UIColorFromRGB(rgbValue) [UIColor \
   colorWithRed:((float)((rgbValue &amp; 0xFF0000) &gt;&gt; 16))/255.0 \
   green:((float)((rgbValue &amp; 0xFF00) &gt;&gt; 8))/255.0 \
   blue:((float)(rgbValue &amp; 0xFF))/255.0 alpha:1.0]
  </code></pre>
  
  <p>My actual hex value which I need to pass to this macro is 0xF2A80C, but it is present in the plist file. I can get this as a string. How should I do in this case?</p>
  
  <p>Thanks in advance.</p>
  
  <p>Do you want any details regarding this?.</p>