Revisions
-
fgassert revised this gist
Apr 25, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,7 +25,7 @@ .domain(d3.keys(interpolators)) .rangeRoundBands([0, height], .1); var values = d3.range(5); var x = d3.scale.ordinal() .domain(values) -
fgassert revised this gist
Apr 25, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,7 +33,7 @@ var color = d3.scale.linear() .domain([0, values.length - 1]) .range(["#ff1900", "#dddddd"]); var svg = d3.select("body").append("svg") .attr("width", width) -
mbostock revised this gist
Aug 23, 2013 . 2 changed files with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ D3 support for CIE [L\*a\*b\*](http://en.wikipedia.org/wiki/Lab_color_space) and [HCL](http://en.wikipedia.org/wiki/CIELUV). These perceptually-motivated color spaces are designed with humans (rather than computers) in mind. RGB and HSL interpolation can cause unintentional grouping due to parts of the color space appearing more visually similar; L\*a\*b\* and HCL, in contrast, are perceptually uniform. For more information, see Gregor Aisch’s post [How To Avoid Equidistant HSV Colors](http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) and Drew Skau’s post [Dear NASA: No More Rainbow Color Scales, Please](http://blog.visual.ly/rainbow-color-scales/). You can create L\*a\*b\* or HCL colors directly using d3.lab or d3.hcl. For example: This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ </style> <body> <script src="http://d3js.org/d3.v3.min.js"></script> <script> var interpolators = { -
mbostock revised this gist
Oct 12, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
LoadingSorry, something went wrong. Reload?Sorry, we cannot display this file.Sorry, this file is invalid so it cannot be displayed. -
mbostock revised this gist
Aug 10, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ var steelblue = d3.lab(52, -4, -32); var steelblue = d3.hcl(-97, 32, 52); ``` You can also convert from RGB or HSL. This is useful for creating brighter or darker colors with uniform changes in perception: ```javascript var lightsteelblue = d3.lab("#4682b4").brighter(); -
mbostock revised this gist
Aug 10, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ D3 2.10 adds support for CIE [L\*a\*b\*](http://en.wikipedia.org/wiki/Lab_color_space) and [HCL](http://en.wikipedia.org/wiki/CIELUV). These perceptually-motivated color spaces are designed with humans (rather than computers) in mind. RGB and HSL interpolation can cause unintentional grouping due to parts of the color space appearing more visually similar; L\*a\*b\* and HCL, in contrast, are perceptually uniform. For more information, see Gregor Aisch’s post [How To Avoid Equidistant HSV Colors](http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) and Drew Skau’s post [Dear NASA: No More Rainbow Color Scales, Please](http://blog.visual.ly/rainbow-color-scales/). You can create L\*a\*b\* or HCL colors directly using d3.lab or d3.hcl. For example: -
mbostock revised this gist
Aug 10, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ D3 2.10.0 adds support for CIE [L\*a\*b\*](http://en.wikipedia.org/wiki/Lab_color_space) and [HCL](http://en.wikipedia.org/wiki/CIELUV). These perceptually-motivated color spaces are designed with humans (rather than computers) in mind. RGB and HSL interpolation can cause unintentional grouping due to parts of the color space appearing more visually similar; L\*a\*b\* and HCL, in contrast, are perceptually uniform. For more information, see Gregor Aisch’s post [How To Avoid Equidistant HSV Colors](http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) and Drew Skau’s post [Dear NASA: No More Rainbow Color Scales, Please](http://blog.visual.ly/rainbow-color-scales/). You can create L\*a\*b\* or HCL colors directly using d3.lab or d3.hcl. For example: -
mbostock revised this gist
Aug 10, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ D3 2.10.0 adds support for CIE [L\*a\*b\*](http://en.wikipedia.org/wiki/Lab_color_space) and [HCL](http://en.wikipedia.org/wiki/CIELUV). These perceptually-motiviated color spaces are designed with humans (rather than computers) in mind. RGB and HSL interpolation can cause unintentional grouping due to parts of the color space appearing more visually similar; L\*a\*b\* and HCL, in contrast, are perceptually uniform. For more information, see Gregor Aisch’s post [How To Avoid Equidistant HSV Colors](http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) and Drew Skau’s post [Dear NASA: No More Rainbow Color Scales, Please](http://blog.visual.ly/rainbow-color-scales/). You can create L\*a\*b\* or HCL colors directly using d3.lab or d3.hcl. For example: -
mbostock revised this gist
Aug 10, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ D3 2.10.0 adds support for CIE [L\*a\*b\*](http://en.wikipedia.org/wiki/Lab_color_space) and [HCL](http://en.wikipedia.org/wiki/CIELUV). These perceptually-motiviated colors spaces are designed with humans (rather than computers) in mind. RGB and HSL interpolation can cause unintentional grouping due to parts of the color space appearing more visually similar; L\*a\*b\* and HCL, in contrast, are perceptually uniform. For more information, see Gregor Aisch’s post [How To Avoid Equidistant HSV Colors](http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) and Drew Skau’s post [Dear NASA: No More Rainbow Color Scales, Please](http://blog.visual.ly/rainbow-color-scales/). You can create L\*a\*b\* or HCL colors directly using d3.lab or d3.hcl. For example: -
mbostock revised this gist
Aug 10, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ </style> <body> <script src="http://d3js.org/d3.v2.min.js?2.10.0"></script> <script> var interpolators = { @@ -62,4 +62,4 @@ .attr("dy", ".35em") .text(function(d) { return d.key; }); </script> -
mbostock revised this gist
Aug 10, 2012 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,17 @@ D3 2.10.0 adds support for CIE [L\*a\*b\*](http://en.wikipedia.org/wiki/Lab_color_space) and [HCL](http://en.wikipedia.org/wiki/CIELUV). These colors spaces are designed with perception in mind. RGB and HSL interpolation can cause unintentional grouping due to parts of the color space appearing more visually similar; L\*a\*b\* and HCL, in contrast, are perceptually uniform. For more information, see Gregor Aisch’s post [How To Avoid Equidistant HSV Colors](http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) and Drew Skau’s post [Dear NASA: No More Rainbow Color Scales, Please](http://blog.visual.ly/rainbow-color-scales/). You can create L\*a\*b\* or HCL colors directly using d3.lab or d3.hcl. For example: ```javascript var steelblue = d3.lab(52, -4, -32); var steelblue = d3.hcl(-97, 32, 52); ``` You can also convert from RGB or HSL. This is useful for creating brighter or darker colors, again with uniform changes in perception: ```javascript var lightsteelblue = d3.lab("#4682b4").brighter(); var darksteelblue = d3.hcl("hsl(207, 44%, 49%)").darker(); ``` Best of all, you can use d3.interpolateLab or d3.interpolateHcl in conjunction with [quantitative scales](https://github.com/mbostock/d3/wiki/Quantitative-Scales) and [transitions](https://github.com/mbostock/d3/wiki/Transitions): -
mbostock revised this gist
Aug 10, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ D3 2.10.0 adds support for CIE [L\*a\*b\*](http://en.wikipedia.org/wiki/Lab_color_space) and [HCL](http://en.wikipedia.org/wiki/CIELUV). These colors spaces are designed with perception in mind. RGB and HSL interpolation can cause unintentional grouping due to parts of the color space appearing more visually similar; L\*a\*b\* and HCL, in contrast, are perceptually uniform. For more information, see Gregor Aisch’s post [How To Avoid Equidistant HSV Colors](http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) and Drew Skau’s post [Dear NASA: No More Rainbow Color Scales, Please](http://blog.visual.ly/rainbow-color-scales/). You can create L\*a\*b\* or HCL colors using d3.lab or d3.hcl. For example: -
mbostock revised this gist
Aug 9, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ var steelblue = d3.lab("#4682b4"); var steelblue = d3.hcl("hsl(207, 44%, 49%)"); ``` Best of all, you can use d3.interpolateLab or d3.interpolateHcl in conjunction with [quantitative scales](https://github.com/mbostock/d3/wiki/Quantitative-Scales) and [transitions](https://github.com/mbostock/d3/wiki/Transitions): ```javascript var color = d3.scale.linear() -
mbostock revised this gist
Aug 9, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ var steelblue = d3.lab("#4682b4"); var steelblue = d3.hcl("hsl(207, 44%, 49%)"); ``` Best of all, you can use d3.interpolateLab or d3.interpolateHcl in conjunction with [quantitative scales](https://github.com/mbostock/d3/wiki/Quantitative-Scales) or with [transitions](https://github.com/mbostock/d3/wiki/Transitions): ```javascript var color = d3.scale.linear() -
mbostock revised this gist
Aug 9, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ D3 2.10.0 adds support for CIE [L\*a\*b\*](http://en.wikipedia.org/wiki/Lab_color_space) and [HCL](http://en.wikipedia.org/wiki/CIELUV). These colors spaces are designed with perception in mind. RGB and HSL interpolation can cause unintentional grouping due to parts of the color space appearing more visually similar; L\*a\*b\* and HCL, in contrast, are perceptually-uniform. For more information, see Gregor Aisch’s post [How To Avoid Equidistant HSV Colors](http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) and Drew Skau’s post [Dear NASA: No More Rainbow Color Scales, Please](http://blog.visual.ly/rainbow-color-scales/). You can create L\*a\*b\* or HCL colors using d3.lab or d3.hcl. For example: -
mbostock revised this gist
Aug 9, 2012 . 1 changed file with 24 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,25 @@ D3 2.10.0 adds support for CIE [L\*a\*b\*](http://en.wikipedia.org/wiki/Lab_color_space) and [HCL](http://en.wikipedia.org/wiki/CIELUV). These colors spaces are designed with perception in mind. RGB and HSL interpolation can cause unintentional grouping due to parts of the color space appearing more visually similar. L\*a\*b\* and HCL, in contrast, are perceptually-uniform color spaces. For more information, see Gregor Aisch’s post [How To Avoid Equidistant HSV Colors](http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) and Drew Skau’s post [Dear NASA: No More Rainbow Color Scales, Please](http://blog.visual.ly/rainbow-color-scales/). You can create L\*a\*b\* or HCL colors using d3.lab or d3.hcl. For example: ```javascript var steelblue = d3.lab(52, -4, -32); var steelblue = d3.hcl(-97, 32, 52); ``` You can also convert from RGB or HSL: ```javascript var steelblue = d3.lab("#4682b4"); var steelblue = d3.hcl("hsl(207, 44%, 49%)"); ``` Best of all, you can use d3.interpolateLab or d3.interpolateHcl in conjunction with [quantitative scales](https://github.com/mbostock/d3/wiki/Quantitative-Scales): ```javascript var color = d3.scale.linear() .range(["steelblue", "brown"]) .interpolate(d3.interpolateHcl); ``` L\*a\*b\* and HCL interpolation is a convenient way to implement color scales that are comparable in quality to [Colorbrewer](http://colorbrewer2.org/). -
mbostock revised this gist
Aug 9, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,3 @@ D3 2.10.0 adds support for CIE [L\*a\*b\*](http://en.wikipedia.org/wiki/Lab_color_space) and [HCL](http://en.wikipedia.org/wiki/CIELUV). These colors spaces are designed with perception in mind: unlike RGB and HSL interpolation which can cause banding, interpolating in L\*a\*b\* or HCL results in perceptually-uniform changes. For more on color spaces, see Gregor Aisch’s post [How To Avoid Equidistant HSV Colors](http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) and Drew Skau’s post [Dear NASA: No More Rainbow Color Scales, Please](http://blog.visual.ly/rainbow-color-scales/). Create L\*a\*b\* or HCL colors using d3.lab or d3.hcl. -
mbostock revised this gist
Aug 9, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,3 @@ D3 2.10.0 adds support for CIE [L\*a\*b\*](http://en.wikipedia.org/wiki/Lab_color_space) and [HCL](http://en.wikipedia.org/wiki/CIELUV). These colors spaces are designed with perception in mind: unlike RGB and HSL, interpolating in L\*a\*b\* or HCL results in perceptually-uniform changes in color. For more on color spaces, see Gregor Aisch’s post [How To Avoid Equidistant HSV Colors](http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) and Drew Skau’s post [Dear NASA: No More Rainbow Color Scales, Please](http://blog.visual.ly/rainbow-color-scales/). Create L\*a\*b\* or HCL colors using d3.lab or d3.hcl. -
mbostock revised this gist
Aug 9, 2012 . No changes.There are no files selected for viewing
-
mbostock revised this gist
Aug 9, 2012 . 3 changed files with 5 additions and 161 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,3 @@ D3 2.10.0 adds support for CIE [L\*a\*b\*](http://en.wikipedia.org/wiki/Lab_color_space) and [HCL](http://en.wikipedia.org/wiki/CIELUV). These colors spaces are designed with perception in mind: unlike RGB and HSL, interpolating in L\*a\*\b\* or HCL results in perceptually-uniform changes in color. For more on color spaces, see Gregor Aisch’s post [How To Avoid Equidistant HSV Colors](http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/) and Drew Skau’s post [Dear NASA: No More Rainbow Color Scales, Please](http://blog.visual.ly/rainbow-color-scales/). Create L\*a\*b\* or HCL colors using d3.lab or d3.hcl. This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,155 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,14 +8,13 @@ </style> <body> <script src="https://raw.github.com/mbostock/d3/2.10.0/d3.v2.min.js"></script> <script> var interpolators = { "HSL": d3.interpolateHsl, "HCL": d3.interpolateHcl, "Lab": d3.interpolateLab, "RGB": d3.interpolateRgb }; -
mbostock revised this gist
Jul 4, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ var interpolators = { "HSL": d3.interpolateHsl, "LCh": d3.cie.interpolateLch, "Lab": d3.cie.interpolateLab, "RGB": d3.interpolateRgb }; -
mbostock revised this gist
Jun 29, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,3 @@ The above gradients compare interpolation in RGB, HSL, [CIE Lab](http://en.wikipedia.org/wiki/Lab_color_space) and [CIE LCh](http://en.wikipedia.org/wiki/CIELUV) color spaces. For more on color spaces, see Gregor Aisch’s post, [How To Avoid Equidistant HSV Colors](http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/). This example is built with [D3](http://d3js.org). Code and documentation are available as the [d3.cie plugin](https://github.com/d3/d3-plugins/tree/master/cie). -
mbostock revised this gist
Jun 29, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,3 @@ The above gradients compare interpolation in RGB, HSL, [CIE Lab](http://en.wikipedia.org/wiki/CIELUV) and [CIE LCh](http://en.wikipedia.org/wiki/CIELUV) color spaces. For more on color spaces, see Gregor Aisch’s post, [How To Avoid Equidistant HSV Colors](http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/). This example is built with [D3](http://d3js.org). Code and documentation are available as the [d3.cie plugin](https://github.com/d3/d3-plugins/tree/master/cie). -
mbostock revised this gist
Jun 29, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,3 @@ The above gradients compare interpolation in RGB, HSL, CIE Lab and CIE LCh color spaces. For more on color spaces, see Gregor Aisch’s post, [How To Avoid Equidistant HSV Colors](http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/). This example is built with [D3](http://d3js.org). Code and documentation are available as the [d3.cie plugin](https://github.com/d3/d3-plugins/tree/master/cie). -
mbostock revised this gist
Jun 29, 2012 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,8 +12,6 @@ <script src="cie.js"></script> <script> var interpolators = { "HSL": d3.interpolateHsl, "LCH": d3.cie.interpolateLch, @@ -28,9 +26,11 @@ .domain(d3.keys(interpolators)) .rangeRoundBands([0, height], .1); var values = d3.range(960 - 28); var x = d3.scale.ordinal() .domain(values) .rangeRoundBands([14, width - 14]); var color = d3.scale.linear() .domain([0, values.length - 1]) @@ -58,7 +58,7 @@ }); g.append("text") .attr("x", 28) .attr("y", y.rangeBand() / 2) .attr("dy", ".35em") .text(function(d) { return d.key; }); -
mbostock revised this gist
Jun 29, 2012 . 2 changed files with 4 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,6 +40,7 @@ bl = b.l - al, bc = b.c - ac, bh = b.h - ah; if (bh > 180) bh -= 360; else if (bh < -180) bh += 360; // shortest path return function(t) { return lch_lab(al + bl * t, ac + bc * t, ah + bh * t) + ""; }; This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,9 +16,9 @@ var interpolators = { "HSL": d3.interpolateHsl, "LCH": d3.cie.interpolateLch, "Lab": d3.cie.interpolateLab, "RGB": d3.interpolateRgb }; var width = 960, @@ -34,7 +34,7 @@ var color = d3.scale.linear() .domain([0, values.length - 1]) .range(["hsl(62,100%,90%)", "hsl(228,30%,20%)"]); var svg = d3.select("body").append("svg") .attr("width", width) -
mbostock revised this gist
Jun 28, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,3 @@ The above gradients compare interpolation in RGB, HSL, CIE Lab and CIE LCH color spaces. For more on color spaces, see Gregor Aisch’s post, [How To Avoid Equidistant HSV Colors](http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/). This example is built with [D3](http://d3js.org). Code and documentation are available as the [d3.cie plugin](https://github.com/d3/d3-plugins/tree/master/cie). -
mbostock revised this gist
Jun 28, 2012 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,10 +15,10 @@ var values = d3.range(960); var interpolators = { "HSL": d3.interpolateHsl, "RGB": d3.interpolateRgb, "Lab": d3.cie.interpolateLab, "LCH": d3.cie.interpolateLch }; var width = 960, -
mbostock revised this gist
Jun 28, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,3 @@ The above gradients compare interpolation in RGB, HSL, CIE Lab and CIE LCH color spaces. Code and documentation are available as the [d3.cie plugin](https://github.com/d3/d3-plugins/tree/master/cie). -
mbostock revised this gist
Jun 28, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,7 @@ var y = d3.scale.ordinal() .domain(d3.keys(interpolators)) .rangeRoundBands([0, height], .1); var x = d3.scale.ordinal() .domain(values)
NewerOlder