<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Tue, 09 Jun 2026 21:20:13 +0000</lastBuildDate>
    <item>
      <title>(PHP) imgcolorallocate wrapper that allows hex values instead of RGB - Jacolyte</title>
      <link>https://snipplr.com/view/8273/imgcolorallocate-wrapper-that-allows-hex-values-instead-of-rgb</link>
      <description>&lt;p&gt;This function will allow you to use '#ABCDEF' or '0xEEFF33' instead of the RGB values required for imagecolorallocate() by stripping away any non hex characters. It will also check and make sure that it's a valid 6 digit hex value after the stripping of non-hex characters takes place.&#13;
&#13;
it simply uses the function hexdec() to convert each R, G, and B hex values to decimal, and then passes them to imagecolorallocate() individually.&#13;
&#13;
See the page: http://us3.php.net/imagecolorallocate&#13;
to learn how to use this wrapper function.&lt;/p&gt;</description>
      <pubDate>Tue, 09 Sep 2008 13:55:48 UTC</pubDate>
      <guid>https://snipplr.com/view/8273/imgcolorallocate-wrapper-that-allows-hex-values-instead-of-rgb</guid>
    </item>
  </channel>
</rss>
