@@ -493,10 +493,79 @@ culori.samples(5).map(culori.easingGamma(2));
493493
494494### Interpolation methods
495495
496+ <div class =' api-figure-grid ' >
497+ <figure >
498+ <img src =' /img/interpolator-linear.svg ' width =' 400 ' height =' 80 ' />
499+ <figcaption >
500+ <a href='#interpolatorLinear'>
501+ <code>culori.<strong>interpolatorLinear</strong></code>
502+ </a>
503+ </figcaption >
504+ </figure >
505+ <figure >
506+ <img src =' /img/interpolator-basis.svg ' width =' 400 ' height =' 80 ' />
507+ <figcaption >
508+ <a href='#interpolatorSplineBasis'>
509+ <code>culori.<strong>interpolatorSplineBasis</strong></code>
510+ </a>
511+ </figcaption >
512+ </figure >
513+ <figure >
514+ <img src =' /img/interpolator-basis-closed.svg ' width =' 400 ' height =' 80 ' />
515+ <figcaption >
516+ <a href='#interpolatorSplineBasisClosed'>
517+ <code>culori.<strong>interpolatorSplineBasisClosed</strong></code>
518+ </a>
519+ </figcaption >
520+ </figure >
521+ <figure >
522+ <img src =' /img/interpolator-natural.svg ' width =' 400 ' height =' 80 ' />
523+ <figcaption >
524+ <a href='#interpolatorSplineNatural'>
525+ <code>culori.<strong>interpolatorSplineNatural</strong></code>
526+ </a>
527+ </figcaption >
528+ </figure >
529+ <figure >
530+ <img src =' /img/interpolator-natural-closed.svg ' width =' 400 ' height =' 80 ' />
531+ <figcaption >
532+ <a href='#interpolatorSplineNaturalClosed'>
533+ <code>culori.<strong>interpolatorSplineNaturalClosed</strong></code>
534+ </a>
535+ </figcaption >
536+ </figure >
537+ <figure >
538+ <img src =' /img/interpolator-monotone.svg ' width =' 400 ' height =' 80 ' />
539+ <figcaption >
540+ <a href='#interpolatorSplineMonotone'>
541+ <code>culori.<strong>interpolatorSplineMonotone</strong></code>
542+ </a>
543+ </figcaption >
544+ </figure >
545+ <figure >
546+ <img src =' /img/interpolator-monotone-2.svg ' width =' 400 ' height =' 80 ' />
547+ <figcaption >
548+ <a href='#interpolatorSplineMonotone2'>
549+ <code>culori.<strong>interpolatorSplineMonotone2</strong></code>
550+ </a>
551+ </figcaption >
552+ </figure >
553+ <figure >
554+ <img src =' /img/interpolator-monotone-closed.svg ' width =' 400 ' height =' 80 ' />
555+ <figcaption >
556+ <a href='#interpolatorSplineMonotoneClosed'>
557+ <code>culori.<strong>interpolatorSplineMonotoneClosed</strong></code>
558+ </a>
559+ </figcaption >
560+ </figure >
561+ </div >
562+
496563You'll use these methods when you want to override how colors get interpolated in a specific color space, or when defining the default interpolation for custom color spaces.
497564
498565<a id =" interpolatorLinear " href =" #interpolatorLinear " >#</a > culori.** interpolatorLinear** (_ values_ ) · ; [ Source] ( https://github.com/evercoder/culori/blob/main/src/interpolate/linear.js )
499566
567+ <img src =' /img/interpolator-linear.svg ' width =' 400 ' height =' 80 ' />
568+
500569A linear interpolator for values in a channel.
501570
502571#### Basis splines
@@ -505,10 +574,14 @@ A linear interpolator for values in a channel.
505574
506575<a id =" interpolatorSplineBasis " href =" #interpolatorSplineBasis " >#</a > culori.** interpolatorSplineBasis** (_ values_ ) · ; [ Source] ( https://github.com/evercoder/culori/blob/main/src/interpolate/splineBasis.js )
507576
577+ <img src =' /img/interpolator-basis.svg ' width =' 400 ' height =' 80 ' />
578+
508579A basis spline which uses one-sided finite differences for the slopes at the boundaries.
509580
510581<a id =" interpolatorSplineBasisClosed " href =" #interpolatorSplineBasisClosed " >#</a > culori.** interpolatorSplineBasisClosed** (_ values_ ) · ; [ Source] ( https://github.com/evercoder/culori/blob/main/src/interpolate/splineBasis.js )
511582
583+ <img src =' /img/interpolator-basis-closed.svg ' width =' 400 ' height =' 80 ' />
584+
512585A basis spline which considers the _ values_ array to be periodic.
513586
514587#### Natural splines
@@ -517,10 +590,14 @@ A basis spline which considers the _values_ array to be periodic.
517590
518591<a id =" interpolatorSplineNatural " href =" #interpolatorSplineNatural " >#</a > culori.** interpolatorSplineNatural** (_ values_ ) · ; [ Source] ( https://github.com/evercoder/culori/blob/main/src/interpolate/splineNatural.js )
519592
593+ <img src =' /img/interpolator-natural.svg ' width =' 400 ' height =' 80 ' />
594+
520595A natural spline which uses one-sided finite differences for the slopes at the boundaries.
521596
522597<a id =" interpolatorSplineNaturalClosed " href =" #interpolatorSplineNaturalClosed " >#</a > culori.** interpolatorSplineNaturalClosed** (_ values_ ) · ; [ Source] ( https://github.com/evercoder/culori/blob/main/src/interpolate/splineNatural.js )
523598
599+ <img src =' /img/interpolator-natural-closed.svg ' width =' 400 ' height =' 80 ' />
600+
524601A natural spline which considers the _ values_ array to be periodic.
525602
526603#### Monotone splines
@@ -533,14 +610,20 @@ The following variants are available:
533610
534611<a id =" interpolatorSplineMonotone " href =" #interpolatorSplineMonotone " >#</a > culori.** interpolatorSplineMonotone** (_ values_ ) · ; [ Source] ( https://github.com/evercoder/culori/blob/main/src/interpolate/splineMonotone.js )
535612
613+ <img src =' /img/interpolator-monotone.svg ' width =' 400 ' height =' 80 ' />
614+
536615A monotone spline that uses one-sided finite differences to find the slopes at the boundaries.
537616
538617<a id =" interpolatorSplineMonotone2 " href =" #interpolatorSplineMonotone2 " >#</a > culori.** interpolatorSplineMonotone2** (_ values_ ) · ; [ Source] ( https://github.com/evercoder/culori/blob/main/src/interpolate/splineMonotone.js )
539618
619+ <img src =' /img/interpolator-monotone-2.svg ' width =' 400 ' height =' 80 ' />
620+
540621A monotone spline for which we derive the slopes at the boundaries by tracing a parabola through the first/last three values.
541622
542623<a id =" interpolatorSplineMonotoneClosed " href =" #interpolatorSplineMonotoneClosed " >#</a > culori.** interpolatorSplineMonotoneClosed** (_ values_ ) · ; [ Source] ( https://github.com/evercoder/culori/blob/main/src/interpolate/splineMonotone.js )
543624
625+ <img src =' /img/interpolator-monotone-closed.svg ' width =' 400 ' height =' 80 ' />
626+
544627A monotone spline which considers the _ values_ array to be periodic.
545628
546629#### Custom piecewise interpolation
0 commit comments