function TGColor(r,g,b)
{
    this.r = r;
    this.g = g;
    this.b = b;
}

TGColor.prototype.toString = function()
{
    return "#" + Tool.decToHex(this.r) + Tool.decToHex(this.g) + Tool.decToHex(this.b);
}

function TGGradient(color1,color2,steps)
{
  this.colors = new Array();
  
  var rv = new TGColor(color2.r - color1.r,color2.g - color1.g,color2.b - color1.b)
  
  for(var i=0; i<steps; i++) 
  {
  	 this.colors[i] = new TGColor(parseInt(color1.r + i / steps * rv.r),parseInt(color1.g + i / steps * rv.g),parseInt(color1.b + i / steps * rv.b));
  }
}


