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