<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Comments on snippet: 'AS3 RGB Colours (object) to HSB Colours (Object)'</title>
    <description>Snipplr comments feed</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Tue, 21 Apr 2026 03:29:51 +0000</lastBuildDate>
    <item>
      <title>forchid said on 15/Jan/2012</title>
      <link>https://snipplr.com/view/48686/as3-rgb-colours-object-to-hsb-colours-object</link>
      <description>&lt;p&gt;&lt;p&gt;It's a great series of conversions functions that you put up. However in this one, I was experiencing some inconsistency when translating max red into the correlating hue.&lt;/p&gt;&#13;
&#13;
&lt;p&gt;I added one line, which seems to have helped to get the proper output for H:&lt;/p&gt;&#13;
&#13;
&lt;p&gt;&lt;code&gt;&#13;
    case r: &#13;
        hsb.h = (g - b)/(_max - _min)*60 + 0; &#13;
        if (hsb.h &lt; 0) hsb.h = 360 + hsb.h;  // &lt;--- added this &#13;
        break;&#13;
&lt;/code&gt;&lt;/p&gt;&lt;/p&gt;</description>
      <pubDate>Sun, 15 Jan 2012 03:44:57 UTC</pubDate>
      <guid>https://snipplr.com/view/48686/as3-rgb-colours-object-to-hsb-colours-object</guid>
    </item>
    <item>
      <title>forchid said on 15/Jan/2012</title>
      <link>https://snipplr.com/view/48686/as3-rgb-colours-object-to-hsb-colours-object</link>
      <description>&lt;p&gt;Bah, that comment formatting didn't seem to work properly, so it looks confusing. This is the line:&#13;
&#13;
if (hsb.h &lt; 0) hsb.h = 360 + hsb.h;&lt;/p&gt;</description>
      <pubDate>Sun, 15 Jan 2012 03:48:07 UTC</pubDate>
      <guid>https://snipplr.com/view/48686/as3-rgb-colours-object-to-hsb-colours-object</guid>
    </item>
  </channel>
</rss>
