第四百四十五章 引狼入室(8 / 10)

投票推荐 加入书签 留言反馈

  fx.end = getrgb(fx.end);
  }
  fx.elem.style[attr] = rgb( + [
  math.max(math.min(parseint((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0),
  math.max(math.min(parseint((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0),
  math.max(math.min(parseint((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0)
  ].join(,) + );
  }
  });
  function getrgb(color) {
  var resu<
  if (color color.constructor == array color.length == 3)
  return color;
  if (result = /rgb(s*([0-9]{1,3})s*,s*([0-9]{1,3})s*,s*([0-9]{1,3})s*)/.exec(color))
  return [parseint(result[1]), parseint(result[2]), parseint(result[3])];
  if (result = /rgb(s*([0-9]+(?:.[0-9]+)?)%s*,s*([0-9]+(?:.[0-9]+)?)%s*,s*([0-9]+(?:.[0-9]+)?)%s*)/.exec(color))
  return [parsefloat(result[1]) * 2.55, parsefloat(result[2]) * 2.55, parsefloat(result[3]) * 2.55];
  if (result = /#([a-fa-f0-9]{2})([a-fa-f0-9]{2})([a-fa-f0-9]{2})/.exec(color))
  return [parseint(result[1], 16), parseint(result[2], 16), parseint(result[3], 16)];
  if (result = /#([a-fa-f0-9])([a-fa-f0-9])([a-fa-f0-9])/.exec(color))
  return [parseint(result[1] + result[1], 16), parseint(result[2] + result[2], 16), parseint(result[3] + result[3], 16)];
  return colors[jquery.trim(color).tolowercase()];
  }
  function getcolor(elem, attr) {
  var color;
  do {
  color = jquery.curcss(elem, attr);
  if (color != '' color != 'transparent' || jquery.nodename(elem, body))
  break;
  attr = backgroundcolor; ↑返回顶部↑


章节目录