s = s/255.0f;
    public void fromColor(Color c)    {        float min, max, delta;        min = findMin(c.getRed(), c.getGreen(), c.getBlue());        max = findMax(c.getRed(), c.getGreen(), c.getBlue());                v = max;                        delta = max-min;        if (max != 0.0f) s = delta/max;             else         {            v = 0.0f;            s = 0.0f;            h = 0.0f;        }        if (c.getRed()==max)            h = (c.getGreen()-c.getBlue())/delta;               else if (c.getGreen() == max)            h = 2.0f + (c.getBlue()-c.getRed())/delta;          else            h = 4.0f+(c.getRed()-c.getGreen())/delta;           h = h * 60.0f;                  if (h < 0) h += 360.0f;                    h = h/360.0f;        v = v/255.0f;        s = s/255.0f;        a = c.getAlpha()/255.0f;    }