X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=tests%2Flinear-regression.html;h=bed74e0c6c155606a43fd03a998c6432fd9c40e9;hb=34bbe78bab0cfe4a986802aa2e3dc5edbcc55c35;hp=e3636c12543f5691f80affa948e6bae158e4cba7;hpb=2a07b0ad9869c9116c06fe1c9084da7fec0923bd;p=dygraphs.git diff --git a/tests/linear-regression.html b/tests/linear-regression.html index e3636c1..bed74e0 100644 --- a/tests/linear-regression.html +++ b/tests/linear-regression.html @@ -95,7 +95,11 @@ var p1 = g.toDomCoords(x1, y1); var p2 = g.toDomCoords(x2, y2); - var color = g.getColors()[i - 1]; + var c = new RGBColor(g.getColors()[i - 1]); + c.r = Math.floor(255 - 0.5 * (255 - c.r)); + c.g = Math.floor(255 - 0.5 * (255 - c.g)); + c.b = Math.floor(255 - 0.5 * (255 - c.b)); + var color = c.toHex(); ctx.save(); ctx.strokeStyle = color; ctx.lineWidth = 1.0;