html中颜色可以使用rgb和hex方式来表示。在色彩中,色相、明度、纯度也都可以产生渐变效果,并会表现出具有丰富层次的美感。本文主要讲述两种颜色RGB数值的梯级渐变算法。 其中如如16进制颜色如#336600分别表示rgb模式中r的值为16进制33(即),g的值为16进制的66,和b为16进制的00,转换后用rgb完整表述为:rgb(51,102,0)。 其中使用16进制进行加减乘除不方便,尤其还使用了rgb的16进制颜色组合(#336600)。因此我们可以将16进制转换为rgb单个进行梯级运算在进行组合。 已知:RStart=50,REnd=200,RStart、REnd之间平均分成3份(Step=3),求每份的数值(StepN)分别是多少。 公式:Gradient = RStart+ (REnd-RStart) / Step * N (第N步的颜色rgb中R的值) 实现方法非常简单,只是需要将颜色从rgb到hex的互转。 实现代码: ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 <code class="js string" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#0000FF;">"text/javascript"</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">></code></p> <p class="line number2 index1 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js comments" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,130,0);">/*</code></p> <p class="line number3 index2 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js comments" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,130,0);">// 作者 yanue</code></p> <p class="line number4 index3 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js comments" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,130,0);">// 参数:</code></p> <p class="line number5 index4 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js comments" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,130,0);">// startColor:开始颜色hex</code></p> <p class="line number6 index5 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js comments" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,130,0);">// endColor:结束颜色hex</code></p> <p class="line number7 index6 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js comments" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,130,0);">// step:几个阶级(几步)</code></p> <p class="line number8 index7 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js comments" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,130,0);">*/</code></p> <p class="line number9 index8 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">function</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">gradientColor(startColor,endColor,step){</code></p> <p class="line number10 index9 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">startRGB = </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">this</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">.colorRgb(startColor);</code><code class="js comments" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,130,0);">//转换为rgb数组模式</code></p> <p class="line number11 index10 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">startR = startRGB[0];</code></p> <p class="line number12 index11 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">startG = startRGB[1];</code></p> <p class="line number13 index12 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">startB = startRGB[2];</code></p> <p class="line number14 index13 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">endRGB = </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">this</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">.colorRgb(endColor);</code></p> <p class="line number15 index14 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">endR = endRGB[0];</code></p> <p class="line number16 index15 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">endG = endRGB[1];</code></p> <p class="line number17 index16 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">endB = endRGB[2];</code></p> <p class="line number18 index17 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">sR = (endR-startR)/step;</code><code class="js comments" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,130,0);">//总差值</code></p> <p class="line number19 index18 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">sG = (endG-startG)/step;</code></p> <p class="line number20 index19 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">sB = (endB-startB)/step;</code></p> <p class="line number21 index20 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">var</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">colorArr = [];</code></p> <p class="line number22 index21 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">for</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">(</code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">var</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">i=0;i<step;i++){</code></p><p class="line number23 index22 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js comments" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,130,0);">//计算每一步的hex值 </code></p><p class="line number24 index23 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">var</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">hex = </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">this</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">.colorHex(</code><code class="js string" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#0000FF;">'rgb('</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">+parseInt((sR*i+startR))+</code><code class="js string" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#0000FF;">','</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">+parseInt((sG*i+startG))+</code><code class="js string" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#0000FF;">','</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">+parseInt((sB*i+startB))+</code><code class="js string" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#0000FF;">')'</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">);</code></p><p class="line number25 index24 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">colorArr.push(hex);</code></p><p class="line number26 index25 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">}</code></p><p class="line number27 index26 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">return</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">colorArr;</code></p><p class="line number28 index27 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">}</code></p><p class="line number29 index28 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js comments" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,130,0);">// 将hex表示方式转换为rgb表示方式(这里返回rgb数组模式)</code></p><p class="line number30 index29 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">gradientColor.prototype.colorRgb = </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">function</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">(sColor){</code></p><p class="line number31 index30 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">var</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">reg = /^</code><code class="js preprocessor" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#808080;">#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;</code></p><p class="line number32 index31 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">var</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">sColor = sColor.toLowerCase();</code></p><p class="line number33 index32 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">if</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">(sColor && reg.test(sColor)){</code></p><p class="line number34 index33 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">if</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">(sColor.length === 4){</code></p><p class="line number35 index34 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">var</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">sColorNew = </code><code class="js string" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#0000FF;">"#"</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">;</code></p><p class="line number36 index35 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">for</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">(</code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">var</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">i=1; i<4; i+=1){</code></p><p class="line number37 index36 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">sColorNew += sColor.slice(i,i+1).concat(sColor.slice(i,i+1));</code></p><p class="line number38 index37 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">}</code></p><p class="line number39 index38 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">sColor = sColorNew;</code></p><p class="line number40 index39 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">}</code></p><p class="line number41 index40 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js comments" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,130,0);">//处理六位的颜色值</code></p><p class="line number42 index41 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">var</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">sColorChange = [];</code></p><p class="line number43 index42 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">for</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">(</code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">var</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">i=1; i<7; i+=2){</code></p><p class="line number44 index43 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">sColorChange.push(parseInt(</code><code class="js string" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#0000FF;">"0x"</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">+sColor.slice(i,i+2)));</code></p><p class="line number45 index44 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">}</code></p><p class="line number46 index45 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">return</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">sColorChange;</code></p><p class="line number47 index46 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">}</code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">else</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">{</code></p><p class="line number48 index47 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">return</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">sColor;</code></p><p class="line number49 index48 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">}</code></p><p class="line number50 index49 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">};</code></p><p class="line number51 index50 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js comments" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,130,0);">// 将rgb表示方式转换为hex表示方式</code></p><p class="line number52 index51 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">gradientColor.prototype.colorHex = </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">function</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">(rgb){</code></p><p class="line number53 index52 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">var</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">_this = rgb;</code></p><p class="line number54 index53 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">var</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">reg = /^</code><code class="js preprocessor" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#808080;">#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;</code></p><p class="line number55 index54 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">if</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">(/^(rgb|RGB)/.test(_this)){</code></p><p class="line number56 index55 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">var</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">aColor = _this.replace(/(?:(|)|rgb|RGB)*/g,</code><code class="js string" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#0000FF;">""</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">).split(</code><code class="js string" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#0000FF;">","</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">);</code></p><p class="line number57 index56 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">var</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">strHex = </code><code class="js string" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#0000FF;">"#"</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">;</code></p><p class="line number58 index57 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">for</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">(</code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">var</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">i=0; i<aColor.length; i++){</code></p><p class="line number59 index58 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">var</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">hex = Number(aColor[i]).toString(16);</code></p><p class="line number60 index59 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">hex = hex<10 ? 0+</code><code class="js string" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#0000FF;">''</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">+hex :hex;</code><code class="js comments" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,130,0);">// 保证每个rgb的值为2位</code></p><p class="line number61 index60 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">if</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">(hex === </code><code class="js string" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#0000FF;">"0"</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">){</code></p><p class="line number62 index61 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">hex += hex;</code></p><p class="line number63 index62 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">}</code></p><p class="line number64 index63 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">strHex += hex;</code></p><p class="line number65 index64 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">}</code></p><p class="line number66 index65 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">if</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">(strHex.length !== 7){</code></p><p class="line number67 index66 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">strHex = _this;</code></p><p class="line number68 index67 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">}</code></p><p class="line number69 index68 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">return</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">strHex;</code></p><p class="line number70 index69 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">}</code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">else</code> <code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">if</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">(reg.test(_this)){</code></p><p class="line number71 index70 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">var</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">aNum = _this.replace(/</code><code class="js preprocessor" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#808080;">#/,"").split("");</code></p><p class="line number72 index71 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">if</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">(aNum.length === 6){</code></p><p class="line number73 index72 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">return</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">_this;</code></p><p class="line number74 index73 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">}</code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">else</code> <code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">if</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">(aNum.length === 3){</code></p><p class="line number75 index74 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">var</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">numHex = </code><code class="js string" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#0000FF;">"#"</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">;</code></p><p class="line number76 index75 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">for</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">(</code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">var</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">i=0; i<aNum.length; i+=1){</code></p><p class="line number77 index76 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">numHex += (aNum[i]+aNum[i]);</code></p><p class="line number78 index77 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">}</code></p><p class="line number79 index78 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">return</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">numHex;</code></p><p class="line number80 index79 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">}</code></p><p class="line number81 index80 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">}</code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">else</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">{</code></p><p class="line number82 index81 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">return</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">_this;</code></p><p class="line number83 index82 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">}</code></p><p class="line number84 index83 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">}</code></p><p class="line number85 index84 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">var</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">gradient = </code><code class="js keyword" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;font-weight:bold;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,102,153);">new</code> <code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">gradientColor(</code><code class="js string" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#0000FF;">'#013548'</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">,</code><code class="js string" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#0000FF;">'#554851'</code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">,10);</code></p><p class="line number86 index85 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">console.log(gradient);</code><code class="js comments" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:rgb(0,130,0);">//控制台输出</code></p><p class="line number87 index86 alt2" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js spaces" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;"> </code><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;">alert(gradient);</code></p><p class="line number88 index87 alt1" style="line-height:15.4px;margin:0px;padding:0px 1em;background-image:none;border:0px;float:none;vertical-align:baseline;min-height:auto;white-space:pre;"><code class="js plain" style="margin:3px auto 0px;padding:0px 0px 0px 5px;background:rgb(255,255,255);border-left:3px solid rgb(108,226,108);font-size:14px;clear:both;border-top:0px;border-right:0px;border-bottom:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;min-height:auto;color:#000000;"> 相关推荐: CSS如何实现文字颜色渐变的实例 javascript实现按钮颜色渐变效果的实例讲解 JavaScript实现的鼠标响应颜色渐变效果完整实例