From: 
Subject: Debian changes

The Debian packaging of node-culori is maintained in git, using a workflow
similar to the one described in dgit-maint-merge(7).
The Debian delta is represented by this one combined patch; there isn't a
patch queue that can be represented as a quilt series.

A detailed breakdown of the changes is available from their canonical
representation -- git commits in the packaging repository.
For example, to see the changes made by the Debian maintainer in the first
upload of upstream version 1.2.3, you could use:

    % git clone https://git.dgit.debian.org/node-culori
    % cd node-culori
    % git log --oneline 1.2.3..debian/1.2.3-1 -- . ':!debian'

(If you have dgit, use `dgit clone node-culori`, rather than plain `git clone`.)

We don't use debian/source/options single-debian-patch because it has bugs.
Therefore, NMUs etc. may nevertheless have made additional patches.

---

diff --git a/test/clamp.test.js b/test/clamp.test.js
index 0566519..2c866cb 100644
--- a/test/clamp.test.js
+++ b/test/clamp.test.js
@@ -10,6 +10,7 @@ import {
 	toGamut,
 	lch
 } from '../src/index.js';
+import { assertApproxEqual } from './util/assert.js';
 
 test('RGB', t => {
 	assert.equal(displayable({ mode: 'rgb', r: 0, g: 0, b: 0 }), true);
@@ -152,9 +153,14 @@ test('clampGamut()', t => {
 	const crimson = 'color(display-p3 0.8 0.1 0.3)';
 	const toRgb = clampGamut('rgb');
 
-	assert.equal(
-		formatCss(toRgb(crimson)),
-		'color(display-p3 0.8015640173988641 0.16985582666875737 0.30217671004779834)',
+	assertApproxEqual(
+		toRgb(crimson),
+		{
+			mode: 'p3',
+			r: 0.8015640173988641,
+			g: 0.16985582666875737,
+			b: 0.30217671004779834
+		},
 		'api docs example'
 	);
 });
@@ -175,15 +181,20 @@ test('toGamut()', t => {
 		'color(srgb 1 1 1)',
 		'chroma = 0'
 	);
-	assert.equal(
-		formatCss(toGamut('p3')('lch(80% 150 60)')),
-		'color(display-p3 0.9999999999999999 0.6969234114981073 0.5084794107705369)',
+	assertApproxEqual(
+		toGamut('p3')('lch(80% 150 60)'),
+		{
+			mode: 'p3',
+			r: 0.9999999999999999,
+			g: 0.6969234114981073,
+			b: 0.5084794107705369
+		},
 		'api docs example'
 	);
 
 	const likeClampChroma = toGamut('rgb', 'lch', null);
 
-	assert.deepEqual(lch(likeClampChroma('lch(50% 120 5)')), {
+	assertApproxEqual(lch(likeClampChroma('lch(50% 120 5)')), {
 		mode: 'lch',
 		l: 50.00519612994975,
 		c: 77.47625128342412,
@@ -253,7 +264,7 @@ test('missing components', t => {
 		'toGamut(), oklch color (no conversion)'
 	);
 
-	assert.deepEqual(
+	assertApproxEqual(
 		toGamut()('color(srgb 1.1 none none)'),
 		{
 			mode: 'rgb',
diff --git a/test/difference.test.js b/test/difference.test.js
index e0bbe12..ad221de 100644
--- a/test/difference.test.js
+++ b/test/difference.test.js
@@ -14,6 +14,7 @@ import {
 	round,
 	hsl
 } from '../src/index.js';
+import { assertApproxEqual } from './util/assert.js';
 
 test('euclidean distance in RGB', t => {
 	let delta = differenceEuclidean();
@@ -153,7 +154,7 @@ test('differenceCmc', t => {
 		2.82061249589761
 	);
 
-	assert.equal(
+	assertApproxEqual(
 		differenceCmc()('lab(50% 40 20)', 'lab(60% 20 100)'),
 		53.10947821085943
 	);
@@ -175,5 +176,5 @@ test('differenceHyab', t => {
 });
 
 test('differenceItp', t => {
-	assert.equal(differenceItp()('red', 'green'), 238.28868759957626);
+	assertApproxEqual(differenceItp()('red', 'green'), 238.28868759957626);
 });
diff --git a/test/interpolate.test.js b/test/interpolate.test.js
index 8a3c317..2627153 100644
--- a/test/interpolate.test.js
+++ b/test/interpolate.test.js
@@ -9,6 +9,7 @@ import {
 	rgb,
 	samples
 } from '../src/index.js';
+import { assertApproxEqual } from './util/assert.js';
 
 test('interpolate between black and white in RGB', t => {
 	let grays = interpolate(['#fff', '#000']);
@@ -203,7 +204,7 @@ test('color interpolation hints', t => {
 		);
 	});
 
-	assert.deepEqual(interpolate(['red', 0.2, 'green'])(0.5), {
+	assertApproxEqual(interpolate(['red', 0.2, 'green'])(0.5), {
 		mode: 'rgb',
 		r: 0.25808621995139025,
 		g: 0.372411622926361,
diff --git a/test/jab.test.js b/test/jab.test.js
index af7e264..057ad94 100644
--- a/test/jab.test.js
+++ b/test/jab.test.js
@@ -1,6 +1,7 @@
 import test from 'node:test';
 import assert from 'node:assert';
 import { jab, rgb, formatHex, formatCss } from '../src/index.js';
+import { assertApproxEqual } from './util/assert.js';
 
 test('jab', t => {
 	assert.deepEqual(
@@ -15,7 +16,7 @@ test('jab', t => {
 		'black'
 	);
 
-	assert.deepEqual(
+	assertApproxEqual(
 		jab('red'),
 		{
 			mode: 'jab',
diff --git a/test/lrgb.test.js b/test/lrgb.test.js
index cd6e4de..8008f13 100644
--- a/test/lrgb.test.js
+++ b/test/lrgb.test.js
@@ -1,6 +1,7 @@
 import test from 'node:test';
 import assert from 'node:assert';
 import { rgb, lrgb, formatCss } from '../src/index.js';
+import { assertApproxEqual } from './util/assert.js';
 
 test('round-trip', t => {
 	let in_gamut = {
@@ -27,7 +28,7 @@ test('round-trip', t => {
 		g: 0.25,
 		b: 2.7
 	};
-	assert.deepEqual(
+	assertApproxEqual(
 		lrgb(out_of_gamut),
 		{
 			mode: 'lrgb',
diff --git a/test/p3.test.js b/test/p3.test.js
index a9efaf5..4de0976 100644
--- a/test/p3.test.js
+++ b/test/p3.test.js
@@ -1,6 +1,7 @@
 import test from 'node:test';
 import assert from 'node:assert';
 import { p3, rgb, formatCss } from '../src/index.js';
+import { assertApproxEqual } from './util/assert.js';
 
 test('p3', t => {
 	assert.deepEqual(
@@ -14,7 +15,7 @@ test('p3', t => {
 		'white'
 	);
 	assert.deepEqual(p3('black'), { mode: 'p3', r: 0, g: 0, b: 0 }, 'black');
-	assert.deepEqual(
+	assertApproxEqual(
 		p3('red'),
 		{
 			mode: 'p3',
diff --git a/test/prophoto.test.js b/test/prophoto.test.js
index 5267862..d7150bb 100644
--- a/test/prophoto.test.js
+++ b/test/prophoto.test.js
@@ -1,6 +1,7 @@
 import test from 'node:test';
 import assert from 'node:assert';
 import { prophoto, rgb, formatCss } from '../src/index.js';
+import { assertApproxEqual } from './util/assert.js';
 
 test('prophoto', t => {
 	assert.deepEqual(
@@ -18,7 +19,7 @@ test('prophoto', t => {
 		{ mode: 'prophoto', r: 0, g: 0, b: 0 },
 		'black'
 	);
-	assert.deepEqual(
+	assertApproxEqual(
 		prophoto('red'),
 		{
 			mode: 'prophoto',
diff --git a/test/rec2020.test.js b/test/rec2020.test.js
index 671ba89..36f0bba 100644
--- a/test/rec2020.test.js
+++ b/test/rec2020.test.js
@@ -1,6 +1,7 @@
 import test from 'node:test';
 import assert from 'node:assert';
 import { rec2020, rgb, formatCss } from '../src/index.js';
+import { assertApproxEqual } from './util/assert.js';
 
 test('rec2020', t => {
 	assert.deepEqual(
@@ -13,7 +14,7 @@ test('rec2020', t => {
 		{ mode: 'rec2020', r: 0, g: 0, b: 0 },
 		'black'
 	);
-	assert.deepEqual(
+	assertApproxEqual(
 		rec2020('red'),
 		{
 			mode: 'rec2020',
diff --git a/test/util/assert.js b/test/util/assert.js
new file mode 100644
index 0000000..f8d9f63
--- /dev/null
+++ b/test/util/assert.js
@@ -0,0 +1,34 @@
+import assert from 'node:assert';
+
+export function assertApproxEqual(actual, expected, message) {
+	if (typeof expected === 'number') {
+		assert.equal(typeof actual, 'number', message);
+		assert.ok(
+			Math.abs(actual - expected) <= 1e-10,
+			`${message || 'number'}: expected ${actual} to be within 1e-10 of ${expected}`
+		);
+		return;
+	}
+
+	if (Array.isArray(expected)) {
+		assert.equal(actual.length, expected.length, message);
+		expected.forEach((value, index) =>
+			assertApproxEqual(actual[index], value, message)
+		);
+		return;
+	}
+
+	if (expected && typeof expected === 'object') {
+		assert.deepEqual(
+			Object.keys(actual).sort(),
+			Object.keys(expected).sort(),
+			message
+		);
+		for (const key of Object.keys(expected)) {
+			assertApproxEqual(actual[key], expected[key], message);
+		}
+		return;
+	}
+
+	assert.equal(actual, expected, message);
+}
