1 | # Changelog
|
2 |
|
3 | # v6.0.0
|
4 | - Add `ignoredColor` option #39. [Example](./docs/examples.md#get-average-color-with-ignored-color)
|
5 | - Get average color from image url #38. [Example](./docs/examples.md#get-average-color-from-image-url)
|
6 | - Split `README.md` by files #40.
|
7 | - Update dev deps in package.json #41.
|
8 |
|
9 | *BREAKING CHANGES*
|
10 | `defaultColor` option is changed.
|
11 | Before: `[255, 255, 255, 255]`.
|
12 | After: `[0, 0, 0, 0]`.
|
13 |
|
14 | # v5.2.1
|
15 | Update dev deps in package.json.
|
16 |
|
17 | # v5.2.0
|
18 | - Fixes for typings
|
19 | - Add `index.esm.js` and `index.common.js` in `/dist`
|
20 | - Add a check when resource is null
|
21 |
|
22 | # v5.1.0
|
23 | - Add module property in package.json
|
24 | - Detailed error output
|
25 |
|
26 | # v5.0.0.
|
27 | - `getColorAsync()` with Promise, callbacks removed.
|
28 | Before:
|
29 | ```js
|
30 | fac.getColorAsync(image, function(color) {
|
31 | console.log(color);
|
32 | // {
|
33 | // error: null,
|
34 | // rgb: 'rgb(255, 0, 0)',
|
35 | // rgba: 'rgba(255, 0, 0, 1)',
|
36 | // hex: '#ff0000',
|
37 | // hexa: '#ff0000ff',
|
38 | // value: [255, 0, 0, 255],
|
39 | // isDark: true,
|
40 | // isLight: false
|
41 | // }
|
42 | }, { algorithm: 'dominant' });
|
43 | ```
|
44 |
|
45 | After:
|
46 | ```js
|
47 | fac.getColorAsync(image, { algorithm: 'dominant' }).then((color) => {
|
48 | console.log(color);
|
49 | // {
|
50 | // rgb: 'rgb(255, 0, 0)',
|
51 | // rgba: 'rgba(255, 0, 0, 1)',
|
52 | // hex: '#ff0000',
|
53 | // hexa: '#ff0000ff',
|
54 | // value: [255, 0, 0, 255],
|
55 | // isDark: true,
|
56 | // isLight: false
|
57 | // }
|
58 | });
|
59 | ```
|
60 |
|
61 | # v4.3.0
|
62 | - Added OffScreenCanvas support @2xAA.
|
63 |
|
64 | # v4.2.0
|
65 | - Added dominant algorithm.
|
66 |
|
67 | # v4.1.1
|
68 | Fixes for `.getColorAsync()` method.
|
69 |
|
70 | # v4.1.0
|
71 | - Fixed bugs in algorithms #12 (thanks @AngReload).
|
72 | - Added typings for TypeScript.
|
73 |
|
74 | # v4.0.1
|
75 | - `/examples` moved to separate [repo](https://github.com/fast-average-color/examples).
|
76 |
|
77 | # v4.0.0
|
78 | - `.getColorFromUnloadedImage()` → `.getColorAsync()`.
|
79 | - Small fixes for examples.
|
80 |
|
81 | # v3.0.0
|
82 | - Added `algorithm` property with values `simple` or `sqrt`. Default: `sqrt`.
|
83 | - Changed parameters in `getColorFromArray4()` method.
|
84 | - Removed `getColorFromArray3()` method.
|
85 |
|
86 | # v2.3.0
|
87 | Improvements in the definition of dark color.
|
88 |
|
89 | # v2.2.0
|
90 | Improvements in the algorithm.
|
91 |
|
92 | # v2.1.0
|
93 | - Add tests
|
94 | - Fix jsDoc
|
95 | - Update devDependencies
|
96 |
|
97 | # v2.0.0
|
98 | Added modes: `speed` and `precision`. Speed by default.
|
99 | ```
|
100 | const fac = new FastAverageColor(image, {mode: 'precision'});
|
101 | ```
|
102 | Added examples:
|
103 | - [Box shadow, 4 sides](https://hcodes.github.io/fast-average-color/examples/box-shadow-4-sides.html)
|
104 | - [Gradient](https://hcodes.github.io/fast-average-color/examples/gradient.html)
|
105 | - [Ambilight](https://hcodes.github.io/fast-average-color/examples/ambilight.html)
|
106 | - [Define the average color for your images](https://hcodes.github.io/fast-average-color/examples/define.html)
|
107 |
|
108 | Added support for HTMLVideoElement.
|
109 |
|
110 | Changed methods:
|
111 | - `.getColorSync()` → `.getColor()`
|
112 | - `.getColor()` → `.Image()`
|
113 |
|
114 | # v1.0.1
|
115 | Fixed errors in the algorithm.
|
116 |
|
117 | # v1.0.0
|
118 | Added:
|
119 | - `.getColorFromArray3()`
|
120 | - `.getColorFromArray4()`
|
121 |
|
122 | Changed:
|
123 | - `.get()` → `.getColor()`
|
124 | - `.getSync()` → `.getColorSync()`
|
125 |
|
126 | Added the example for canvas.
|
127 | Updated README.
|
128 |
|
129 | # v0.1.0
|
130 | First public release.
|