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

12 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock 36fd5340cb Merge branch 'case-insensitive-color-names' of https://github.com/wilg/d3 into 3.5.4 2015-02-07 08:29:07 -08:00
Mike Bostock 4b6bd05a32 Add rebeccapurple test. 2015-02-07 08:21:51 -08:00
Wil Gieseler f10946b90e named colors are case insensitive 2015-02-05 16:16:33 -08:00
Mike Bostock b6b80f7270 Fix d3.lab(d3.hcl(…)).
Due to the tests using two different copies of d3 (one loaded via require, and
the other via smash), the instanceof check in the d3.lab constructor was
returning false when testing for d3.hcl, and this constructor was therefore
never tested.
2014-10-13 14:34:12 -07:00
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 0c7d1864f2 Saturation is only undefined for black and white. 2013-04-30 16:09:40 -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