Skip to content

Commit 82100d5

Browse files
committed
Linting
1 parent ada0a90 commit 82100d5

File tree

4 files changed

+2
-10
lines changed

4 files changed

+2
-10
lines changed

src/clamp.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ export function toGamut(
199199
const ucs = converter(mode);
200200
const { ranges } = getMode(mode);
201201

202-
const gamutDef = getMode(dest);
203202
const White = destConv('white');
204203
const Black = destConv('black');
205204

test/clamp.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
inGamut,
66
clampGamut,
77
formatCss,
8-
differenceEuclidean,
98
toGamut
109
} from '../src/index.js';
1110

test/visual/gamut-mapping-algorithms.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
differenceEuclidean,
1010
getMode,
1111
inGamut,
12-
toGamut,
1312
oklab
1413
} from '../../src/index.js';
1514

@@ -41,7 +40,6 @@ export function toGamutCSSColor4(
4140
return undefined;
4241
}
4342
const candidate = { ...ucs(color) };
44-
const initial = { ...candidate };
4543
if (candidate.l >= ranges.l[1]) {
4644
const res = { ...White };
4745
if (color.alpha !== undefined) {
@@ -107,7 +105,6 @@ export function toGamutCSSColor4Smooth(
107105
return undefined;
108106
}
109107
const candidate = { ...ucs(color) };
110-
const initial = { ...candidate };
111108
if (candidate.l >= ranges.l[1]) {
112109
const res = { ...White };
113110
if (color.alpha !== undefined) {
@@ -185,7 +182,6 @@ export function toGamutFuzzy(
185182
return undefined;
186183
}
187184
const candidate = { ...ucs(color) };
188-
const initial = { ...candidate };
189185
if (candidate.l >= ranges.l[1]) {
190186
const res = { ...White };
191187
if (color.alpha !== undefined) {
@@ -235,7 +231,6 @@ export function toGamutCLReduce(
235231
delta = differenceEuclidean('oklch')
236232
) {
237233
const inDestinationGamut = inGamut(dest);
238-
const clipToGamut = clampGamut(dest);
239234
const destConv = converter(dest);
240235

241236
const ucs = converter(mode);
@@ -254,7 +249,6 @@ export function toGamutCLReduce(
254249
return undefined;
255250
}
256251
const candidate = { ...ucs(color) };
257-
const initial = { ...candidate };
258252
if (candidate.l >= ranges.l[1]) {
259253
const res = { ...White };
260254
if (color.alpha !== undefined) {
@@ -300,7 +294,7 @@ export function toGamutCLReduce(
300294
export function toGamutNewton() {
301295
return color => {
302296
const color_oklab = oklab(color);
303-
const [res_oklab, res_rgb] = GamutMapNewton([
297+
const [, res_rgb] = GamutMapNewton([
304298
color_oklab.l,
305299
color_oklab.a,
306300
color_oklab.b

test/visual/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function draw(canvas, fn) {
5454
const w = canvas.width;
5555
const h = canvas.height;
5656
const imageData = ctx.createImageData(w, h);
57-
for (let idx = 0, i, j, color; idx < imageData.data.length; ) {
57+
for (let idx = 0, color; idx < imageData.data.length; ) {
5858
color = fn((idx / 4) % w, Math.floor(idx / 4 / w));
5959
if (!color) {
6060
throw new Error('no color');

0 commit comments

Comments
 (0)