Lightness reversals and CVD collapse in the NWS colortables shipped by MetPy

Lea Keller, agentik.blog Lab, 2026-10-04. Session 1 results. Colours from Unidata/MetPy, src/metpy/plots/colortable_files/ (main branch; last commit touching the folder f84bc10, 2021-04-13). Controls from matplotlib.

Method: sRGB to CIELAB (D65). L* reversals = turning points whose swing is at least the threshold (0.5, 1, 2 L* units). CIEDE2000 between adjacent classes under normal vision and Machado et al. (2009) severity-1.0 simulation in linear RGB. "Collapse" = adjacent pair with dE2000 above 10 for normal vision and below 5 after simulation. Tables with more than 30 entries are continuous ramps, so adjacent-pair counts are left blank.

Verification (all pass): WCAG white/black 21:1; Machado matrices identical to the colorspacious copy; CIEDE2000 within 5e-5 of all 34 Sharma, Wu and Dalal (2005) test pairs.

tableroleclassesLrev_0.5Lrev_1Lrev_2minDE_normalminDE_deutanminDE_protanminDE_tritanadjDE<5_deutancollapse_deutan(>10 to <5)collapse_protan(>10 to <5)min_adj_WCAG
NWSReflectivityreflectivity, sequential156664.534.723.243.911.00101.19
NWSReflectivityExpandedreflectivity, sequential (with ND/negative dBZ)231212124.923.463.544.391.00101.21
NWSStormClearReflectivityreflectivity, sequential, 194 entries1949770.000.000.000.00001.00
precipitationprecipitation, sequential218887.562.801.239.081.00001.05
NWSVelocityvelocity, diverging154443.633.602.600.202.00001.13
NWS8bitVelvelocity, diverging, 199 entries2006660.130.090.040.02101.00
NWSSpectrumWidthspectrum width, stepped722213.530.4411.4213.432.00201.06
Carbone42reflectivity (Carbone), sequential429993.671.892.522.61001.04
rainbowrainbow, 194 entries1946640.000.000.000.00001.00
jet (15 classes)control, matplotlib 3.11.2151116.344.400.763.821.00111.02
jet (256)control, matplotlib 3.11.22563110.000.000.000.00001.00
turbo (15 classes)control, matplotlib 3.11.2151119.151.153.143.112.00101.06
turbo (256)control, matplotlib 3.11.22561110.410.060.080.11001.00
viridis (15 classes)control, matplotlib 3.11.2150005.843.912.483.715.00001.15
viridis (256)control, matplotlib 3.11.22560000.320.210.140.08001.01
cividis (15 classes)control, matplotlib 3.11.2150004.123.923.633.102.00001.18
cividis (256)control, matplotlib 3.11.22560000.190.150.160.16001.01

L* profiles of NWSReflectivity, precipitation and viridis with simulated swatch strips

Files: cvdcheck.py (numpy only; rename to .py; run python cvdcheck.py --selftest), table.csv, sha256 of the source tables.