Skip to content

Commit

Permalink
Clarify mapping from original scheme.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Apr 30, 2014
1 parent e92e4fe commit bc9d113
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cubehelix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,20 @@ Constructs a new linear cubehelix scale with the default domain [0, 1] and range

Specifies the starting hue of the range in degrees. The smallest value in the domain is mapped to this hue. If no argument is specified, returns the scale’s current starting hue, which defaults to 420°.

To convert from the original color scheme’s <i>START</i> parameter, use the following equality: <i>startHue</i> = <i>(START / 3 + 1) * 360</i>.

<a href="#endHue" name="endHue">#</a> cubehelix.<b>endHue</b>([<i>endHue</i>])

Specifies the ending hue of the range in degrees. The smallest value in the domain is mapped to this hue. If no argument is specified, returns the scale’s current ending hue, which defaults to -120°.

To convert from the original color scheme’s <i>START</i> and <i>ROTS</i> parameters, use the following equality: <i>endHue</i> = <i>(START / 3 + 1 + ROTS) * 360</i>.

<a href="#saturation" name="saturation">#</a> cubehelix.<b>saturation</b>([<i>saturation</i>])

Specifies the average saturation of colors in the output range. If no argument is specified, returns the scale’s current average saturation, which defaults to 0.6.

To convert from the original color scheme’s <i>HUE</i> parameter, use the following equality: <i>saturation</i> = <i>HUE</i> / 2.

<a href="#gamma" name="gamma">#</a> cubehelix.<b>gamma</b>([<i>gamma</i>])

Specifies the gamma correction value. If no argument is specified, returns the scale’s current gamma correction value, which defaults to 1.
Expand Down

0 comments on commit bc9d113

Please sign in to comment.