關燈 巨大 直達底部
親,雙擊螢幕即可自動滾動
第五百八十九章在一起

'color',

'outlinecolor'],

function

(i,

attr)

{

jquery.fx.step[attr]

=

function

(fx)

{

if

(fx.state

==

0)

{

fx.start

=

getcolor(fx.elem,

attr);

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

result;

if

(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)];

為您推薦