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(
300294export 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
0 commit comments