Граф коммитов

7 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock ce6526cfe3 Color interpolators return color instances.
Fixes #1029. Previously, these interpolators returned RGB hexadecimal strings,
as the intent was for the color to be used to set attributes and styles.
However, since #333, all colors return RGB hexadecimal strings when coerced to a
string, so we can get the equivalent behavior by returning a color instance
rather than a string. Returning a color instance is also more useful in the case
where additional color manipulation (such as brighter/darker) is desired.
2013-07-05 11:18:06 -07:00
Mike Bostock ff5364d7db Allow hue, chroma or saturation to be undefined.
In HSL space, grayscale colors can now have undefined hue rather than assuming a
hue of 0°; likewise black and white can have undefined saturation rather than
assuming 0%. In HCL space, black can now have undefined hue and chroma. (For
non-black grayscale colors, including white, hue and chroma are implied by the
D65 standard referent.)

When interpolating between colors with undefined hue, saturation or chroma, the
defined value is used when available. For example, when interpolating from black
to blue in HCL space, the intermediate colors are now dark blues (#241178)
rather than dark purples (#600054).

Fixes #833.
2013-04-19 10:26:39 -07:00
Mike Bostock 0d7c6c55e7 Use _ to disambiguate local vs. global d3. 2013-03-14 15:14:12 -07:00
Mike Bostock 68be0ac8c8 Rename assert and XMLHttpRequest. 2013-03-14 13:00:04 -07:00
Mike Bostock 97f034a44d Refactor color tests for minimal loading. 2013-03-14 09:06:31 -07:00
Mike Bostock 04fe8f8e4b Refactor color tests using smash. 2013-03-13 19:13:38 -07:00
Mike Bostock 58dc604177 Move tests to match new source structure. 2013-03-13 02:08:02 -07:00