@d3plus/color 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # @d3plus/color
2
2
 
3
+ [![NPM version](https://img.shields.io/npm/v/@d3plus/color.svg)](https://www.npmjs.com/package/@d3plus/color)
4
+ [![codecov](https://codecov.io/gh/d3plus/d3plus/graph/badge.svg?flag=color)](https://codecov.io/gh/d3plus/d3plus/flags)
5
+
3
6
  Color functions that extent the ability of d3-color.
4
7
 
5
8
  ## Installing
@@ -50,7 +53,7 @@ Live examples can be found on [d3plus.org](https://d3plus.org/), which includes
50
53
 
51
54
  > **colorAdd**(`c1`: `string`, `c2`: `string`, `o1?`: `number`, `o2?`: `number`): `string`
52
55
 
53
- Defined in: [add.ts:10](https://github.com/d3plus/d3plus/blob/e9db3c74352143cd7b6bdc8d0786477ea971eb6d/packages/color/src/add.ts#L10)
56
+ Defined in: [add.ts:10](https://github.com/d3plus/d3plus/blob/fe174c3153bf379a226e4a41b6a8492a86c3a1b7/packages/color/src/add.ts#L10)
54
57
 
55
58
  Adds two colors together.
56
59
 
@@ -75,7 +78,7 @@ Adds two colors together.
75
78
 
76
79
  > **colorAssign**(`c`: `string` \| `boolean` \| `null` \| `undefined`, `u?`: `Partial`\<[`ColorDefaults`](#colordefaults)\>): `string`
77
80
 
78
- Defined in: [assign.ts:9](https://github.com/d3plus/d3plus/blob/e9db3c74352143cd7b6bdc8d0786477ea971eb6d/packages/color/src/assign.ts#L9)
81
+ Defined in: [assign.ts:9](https://github.com/d3plus/d3plus/blob/fe174c3153bf379a226e4a41b6a8492a86c3a1b7/packages/color/src/assign.ts#L9)
79
82
 
80
83
  Assigns a color to a value using a predefined set of defaults.
81
84
 
@@ -98,7 +101,7 @@ Assigns a color to a value using a predefined set of defaults.
98
101
 
99
102
  > **colorContrast**(`c`: `string`, `u?`: `Partial`\<[`ColorDefaults`](#colordefaults)\>): `string`
100
103
 
101
- Defined in: [contrast.ts:9](https://github.com/d3plus/d3plus/blob/e9db3c74352143cd7b6bdc8d0786477ea971eb6d/packages/color/src/contrast.ts#L9)
104
+ Defined in: [contrast.ts:9](https://github.com/d3plus/d3plus/blob/fe174c3153bf379a226e4a41b6a8492a86c3a1b7/packages/color/src/contrast.ts#L9)
102
105
 
103
106
  A set of default color values used when assigning colors based on data.
104
107
 
@@ -121,7 +124,7 @@ A set of default color values used when assigning colors based on data.
121
124
 
122
125
  > **colorLegible**(`c`: `string`): `string`
123
126
 
124
- Defined in: [legible.ts:7](https://github.com/d3plus/d3plus/blob/e9db3c74352143cd7b6bdc8d0786477ea971eb6d/packages/color/src/legible.ts#L7)
127
+ Defined in: [legible.ts:7](https://github.com/d3plus/d3plus/blob/fe174c3153bf379a226e4a41b6a8492a86c3a1b7/packages/color/src/legible.ts#L7)
125
128
 
126
129
  Darkens a color so that it will appear legible on a white background.
127
130
 
@@ -143,7 +146,7 @@ Darkens a color so that it will appear legible on a white background.
143
146
 
144
147
  > **colorLighter**(`c`: `string`, `i?`: `number`): `string`
145
148
 
146
- Defined in: [lighter.ts:8](https://github.com/d3plus/d3plus/blob/e9db3c74352143cd7b6bdc8d0786477ea971eb6d/packages/color/src/lighter.ts#L8)
149
+ Defined in: [lighter.ts:8](https://github.com/d3plus/d3plus/blob/fe174c3153bf379a226e4a41b6a8492a86c3a1b7/packages/color/src/lighter.ts#L8)
147
150
 
148
151
  Similar to d3.color.brighter, except that this also reduces saturation so that colors don't appear neon.
149
152
 
@@ -166,7 +169,7 @@ Similar to d3.color.brighter, except that this also reduces saturation so that c
166
169
 
167
170
  > **colorSubtract**(`c1`: `string`, `c2`: `string`, `o1?`: `number`, `o2?`: `number`): `string`
168
171
 
169
- Defined in: [subtract.ts:10](https://github.com/d3plus/d3plus/blob/e9db3c74352143cd7b6bdc8d0786477ea971eb6d/packages/color/src/subtract.ts#L10)
172
+ Defined in: [subtract.ts:10](https://github.com/d3plus/d3plus/blob/fe174c3153bf379a226e4a41b6a8492a86c3a1b7/packages/color/src/subtract.ts#L10)
170
173
 
171
174
  Subtracts one color from another.
172
175
 
@@ -191,7 +194,7 @@ Subtracts one color from another.
191
194
 
192
195
  > `const` **colorDefaults**: [`ColorDefaults`](#colordefaults)
193
196
 
194
- Defined in: [defaults.ts:37](https://github.com/d3plus/d3plus/blob/e9db3c74352143cd7b6bdc8d0786477ea971eb6d/packages/color/src/defaults.ts#L37)
197
+ Defined in: [defaults.ts:37](https://github.com/d3plus/d3plus/blob/fe174c3153bf379a226e4a41b6a8492a86c3a1b7/packages/color/src/defaults.ts#L37)
195
198
 
196
199
  A set of default color values used when assigning colors based on data.
197
200
 
@@ -221,15 +224,15 @@ A set of default color values used when assigning colors based on data.
221
224
 
222
225
  ### ColorDefaults
223
226
 
224
- Defined in: [defaults.ts:6](https://github.com/d3plus/d3plus/blob/e9db3c74352143cd7b6bdc8d0786477ea971eb6d/packages/color/src/defaults.ts#L6)
227
+ Defined in: [defaults.ts:6](https://github.com/d3plus/d3plus/blob/fe174c3153bf379a226e4a41b6a8492a86c3a1b7/packages/color/src/defaults.ts#L6)
225
228
 
226
229
  #### Properties
227
230
 
228
231
  | Property | Type | Defined in |
229
232
  | ------ | ------ | ------ |
230
- | <a id="property-dark"></a> `dark` | `string` | [defaults.ts:7](https://github.com/d3plus/d3plus/blob/e9db3c74352143cd7b6bdc8d0786477ea971eb6d/packages/color/src/defaults.ts#L7) |
231
- | <a id="property-light"></a> `light` | `string` | [defaults.ts:8](https://github.com/d3plus/d3plus/blob/e9db3c74352143cd7b6bdc8d0786477ea971eb6d/packages/color/src/defaults.ts#L8) |
232
- | <a id="property-missing"></a> `missing` | `string` | [defaults.ts:9](https://github.com/d3plus/d3plus/blob/e9db3c74352143cd7b6bdc8d0786477ea971eb6d/packages/color/src/defaults.ts#L9) |
233
- | <a id="property-off"></a> `off` | `string` | [defaults.ts:10](https://github.com/d3plus/d3plus/blob/e9db3c74352143cd7b6bdc8d0786477ea971eb6d/packages/color/src/defaults.ts#L10) |
234
- | <a id="property-on"></a> `on` | `string` | [defaults.ts:11](https://github.com/d3plus/d3plus/blob/e9db3c74352143cd7b6bdc8d0786477ea971eb6d/packages/color/src/defaults.ts#L11) |
235
- | <a id="property-scale"></a> `scale` | `ScaleOrdinal`\<`string`, `string`\> | [defaults.ts:12](https://github.com/d3plus/d3plus/blob/e9db3c74352143cd7b6bdc8d0786477ea971eb6d/packages/color/src/defaults.ts#L12) |
233
+ | <a id="property-dark"></a> `dark` | `string` | [defaults.ts:7](https://github.com/d3plus/d3plus/blob/fe174c3153bf379a226e4a41b6a8492a86c3a1b7/packages/color/src/defaults.ts#L7) |
234
+ | <a id="property-light"></a> `light` | `string` | [defaults.ts:8](https://github.com/d3plus/d3plus/blob/fe174c3153bf379a226e4a41b6a8492a86c3a1b7/packages/color/src/defaults.ts#L8) |
235
+ | <a id="property-missing"></a> `missing` | `string` | [defaults.ts:9](https://github.com/d3plus/d3plus/blob/fe174c3153bf379a226e4a41b6a8492a86c3a1b7/packages/color/src/defaults.ts#L9) |
236
+ | <a id="property-off"></a> `off` | `string` | [defaults.ts:10](https://github.com/d3plus/d3plus/blob/fe174c3153bf379a226e4a41b6a8492a86c3a1b7/packages/color/src/defaults.ts#L10) |
237
+ | <a id="property-on"></a> `on` | `string` | [defaults.ts:11](https://github.com/d3plus/d3plus/blob/fe174c3153bf379a226e4a41b6a8492a86c3a1b7/packages/color/src/defaults.ts#L11) |
238
+ | <a id="property-scale"></a> `scale` | `ScaleOrdinal`\<`string`, `string`\> | [defaults.ts:12](https://github.com/d3plus/d3plus/blob/fe174c3153bf379a226e4a41b6a8492a86c3a1b7/packages/color/src/defaults.ts#L12) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d3plus/color",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "Color functions that extent the ability of d3-color.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -44,6 +44,7 @@
44
44
  "build:types": "tsc",
45
45
  "build:umd": "node ../../scripts/build-umd.js",
46
46
  "dev": "node ../../scripts/dev.js",
47
- "test": "eslint index.ts src/**/*.ts && eslint --global=it test && mocha 'test/**/*-test.js'"
47
+ "test": "eslint index.ts src/**/*.ts && eslint --global=it test && mocha 'test/**/*-test.js'",
48
+ "test:coverage": "c8 -r text -r lcov --src src mocha 'test/**/*-test.js'"
48
49
  }
49
50
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- @d3plus/color v3.0.16
2
+ @d3plus/color v3.1.0
3
3
  Color functions that extent the ability of d3-color.
4
4
  Copyright (c) 2026 D3plus - https://d3plus.org
5
5
  @license MIT
@@ -1,5 +1,5 @@
1
1
  /*
2
- @d3plus/color v3.0.16
2
+ @d3plus/color v3.1.0
3
3
  Color functions that extent the ability of d3-color.
4
4
  Copyright (c) 2026 D3plus - https://d3plus.org
5
5
  @license MIT
@@ -1,5 +1,5 @@
1
1
  /*
2
- @d3plus/color v3.0.16
2
+ @d3plus/color v3.1.0
3
3
  Color functions that extent the ability of d3-color.
4
4
  Copyright (c) 2026 D3plus - https://d3plus.org
5
5
  @license MIT
@@ -1,5 +1,5 @@
1
1
  /*
2
- @d3plus/color v3.0.16
2
+ @d3plus/color v3.1.0
3
3
  Color functions that extent the ability of d3-color.
4
4
  Copyright (c) 2026 D3plus - https://d3plus.org
5
5
  @license MIT