diff --git a/.changeset/new-apricots-refuse.md b/.changeset/new-apricots-refuse.md deleted file mode 100644 index aac2c53..0000000 --- a/.changeset/new-apricots-refuse.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@sardine/colour": minor ---- - -Add getContrastRatioFromCSSRGB function diff --git a/.changeset/rude-otters-tie.md b/.changeset/rude-otters-tie.md deleted file mode 100644 index c98d756..0000000 --- a/.changeset/rude-otters-tie.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@sardine/colour": minor ---- - -Add getContrastRatioFromNamedCSSColour function diff --git a/.changeset/shy-books-learn.md b/.changeset/shy-books-learn.md deleted file mode 100644 index 4ff256a..0000000 --- a/.changeset/shy-books-learn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@sardine/colour": minor ---- - -Adds getContrastRatioFromHex diff --git a/.changeset/silent-impalas-cry.md b/.changeset/silent-impalas-cry.md deleted file mode 100644 index 87589e6..0000000 --- a/.changeset/silent-impalas-cry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@sardine/colour": minor ---- - -Add getContrastRatio function diff --git a/CHANGELOG.md b/CHANGELOG.md index a8bcf1d..3ce31ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # @sardine/colour +## 2.2.0 + +### Minor Changes + +- a808056: Adds `getContrastRatioFromCSSRGB` +- a808056: Adds `getContrastRatioFromNamedCSSColour` +- 202ef96: Adds `getContrastRatioFromHex` +- a808056: Adds `getContrastRatio` + ## 2.1.1 ### Patch Changes @@ -10,23 +19,23 @@ ### Minor Changes -- d3ed0f8: feat: Adds a build compatible with unpkg CDN -- 2726662: feat: Adds convertHextoNamedCSSColour - feat: Adds convertNamedCSSColourtoRGB - feat: Adds convertCSSRGBtoRGB - feat: Adds convertRGBtoCSSRGB - feat: Adds convertRGBtoNamedCSSColour - feat: Adds findNearestColour - feat: Adds findNearestCSSRGBColour - feat: Adds findNearestHexColour - feat: Adds findNearestNamedCSSColour - feat: Adds findNearestRGBColour +- d3ed0f8: Adds a build compatible with unpkg CDN +- 2726662: Adds `convertHextoNamedCSSColour` +- 2726662: Adds `convertNamedCSSColourtoRGB` +- 2726662: Adds `convertCSSRGBtoRGB` +- 2726662: Adds `convertRGBtoCSSRGB` +- 2726662: Adds `convertRGBtoNamedCSSColour` +- 2726662: Adds `findNearestColour` +- 2726662: Adds `findNearestCSSRGBColour` +- 2726662: Adds `findNearestHexColour` +- 2726662: Adds `findNearestNamedCSSColour` +- 2726662: Adds `findNearestRGBColour` ## 2.0.2 ### Patch Changes -- adfe49a: fix: Reverts default export to CJS +- adfe49a: Reverts default export to CJS Some widely used tools like [Jest still don't support ESM](https://jestjs.io/docs/ecmascript-modules) yet. This reverts the package to CJS, so node based tools can use it without any issues and we rely on modern bundlers to pick the ESM version when possible. @@ -35,57 +44,57 @@ ### Patch Changes -- e4aa71e: fix: Correctly sets package.json exports for ESM projects -- c1c02f0: bug: improves treeshaking for named CSS colours +- e4aa71e: Correctly sets package.json exports for ESM projects +- c1c02f0: Improves treeshaking for named CSS colours ## 2.0.0 ### Major Changes -- f0ff977: chore: Sets Node 16 as minimum version -- 2db684b: chore: Adds @tsconfig/node16 +- f0ff977: Sets Node 16 as minimum version +- 2db684b: Adds @tsconfig/node16 ### Minor Changes -- b7147f9: chore: Adds compatibility with TypeScript's `"moduleResolution": "bundler"` compiler option +- b7147f9: Adds compatibility with TypeScript's `"moduleResolution": "bundler"` compiler option ## 1.6.1 ### Patch Changes -- b45cbfc: fix: `convertCSSRGBtoRGB` now returns the alpha channel as `undefined` instead of `NaN` if no alpha is present in CSS RGB function +- b45cbfc: `convertCSSRGBtoRGB` now returns the alpha channel as `undefined` instead of `NaN` if no alpha is present in CSS RGB function ## 1.6.0 ### Minor Changes -- 732f0ee: feat: Add convertNamedCSSColourtoHex -- 97eb272: feat: Add convertRGBtoHex -- 9dfb34f: feat: Add isDarkColour -- b35132a: feat: Add isCSSNamedDarkColour -- b35132a: feat: Add isCSSRGBColour -- b35132a: feat: Add isCSSRGBDarkColour -- b35132a: feat: Add isHexColour -- f16c7cf: feat: Add convertCSSRGBtoHex -- b35132a: feat: Increase coverage of different CSS RGB formats +- 732f0ee: Add `convertNamedCSSColourtoHex` +- 97eb272: Add `convertRGBtoHex` +- 9dfb34f: Add `isDarkColour` +- b35132a: Add `isCSSNamedDarkColour` +- b35132a: Add `isCSSRGBColour` +- b35132a: Add `isCSSRGBDarkColour` +- b35132a: Add `isHexColour` +- f16c7cf: Add `convertCSSRGBtoHex` +- b35132a: Increase coverage of different CSS RGB formats ## 1.5.0 ### Minor Changes -- d513567: Add isHexDarkColour +- d513567: Add `isHexDarkColour` ## 1.4.0 ### Minor Changes -- 748504c: feat: Add `pickHexColorContrast` function +- 748504c: Add `pickHexColorContrast` ## 1.3.0 ### Minor Changes -- bea0ea2: feat: Add getSRGBLuminanceFromHex +- bea0ea2: Add `getSRGBLuminanceFromHex` ## 1.2.0 @@ -95,4 +104,4 @@ ### Patch Changes -- 8f23abd: test: Added extra test +- 8f23abd: Added extra test diff --git a/package.json b/package.json index 79318a1..517dab4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sardine/colour", - "version": "2.1.1", + "version": "2.2.0", "description": "It does things to colours", "type": "module", "module": "./dist/index.mjs",