diff --git a/src/scales/schemes.js b/src/scales/schemes.js index c629eef305..38c65fd57b 100644 --- a/src/scales/schemes.js +++ b/src/scales/schemes.js @@ -144,7 +144,7 @@ const ordinalSchemes = new Map([ function scheme9(scheme, interpolate) { return ({length: n}) => { if (n === 1) return [scheme[3][1]]; // favor midpoint - if (n === 2) return [scheme[3][0], scheme[3][2]]; // favor extrema + if (n === 2) return [scheme[3][1], scheme[3][2]]; // favor darker n = Math.max(3, Math.floor(n)); return n > 9 ? quantize(interpolate, n) : scheme[n]; }; diff --git a/test/output/colorSchemesOrdinal.html b/test/output/colorSchemesOrdinal.html index 1bc2eefe91..1a783107c0 100644 --- a/test/output/colorSchemesOrdinal.html +++ b/test/output/colorSchemesOrdinal.html @@ -3635,7 +3635,7 @@ align-items: center; margin-right: 1em; } - blues1 + blues1
greens1 + greens1
greys1 + greys1
oranges1 + oranges1
purples1 + purples1
reds1 + reds1
bugn1 + bugn1
bupu1 + bupu1
gnbu1 + gnbu1
orrd1 + orrd1
pubu1 + pubu1
pubugn1 + pubugn1
purd1 + purd1
rdpu1 + rdpu1
ylgn1 + ylgn1
ylgnbu1 + ylgnbu1
ylorbr1 + ylorbr1
ylorrd1 + ylorrd1