title: What is the data type of a hex value like 0xD2691E?
body: <p>I'm trying to write a method which takes in a hex value such as <code>0xD2691E</code> for the purpose of returning a UIColor object.</p>
  
  <p>I <a href="https://stackoverflow.com/questions/3805177/how-to-convert-hex-rgb-color-codes-to-uicolor">found this macro</a> which I want to convert into a method, but I don't know how to specify the data type other than <code>void *</code>.</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]
  
    //Then use any Hex value
  
   self.view.backgroundColor = UIColorFromRGB(0xD2691E);  
  </code></pre>