[ Front page ]  [ Archive ]  [ Modern version ]                 
                                                                
7EARTH ── PALETTES                                              
                                                                
                                                                
The best greys, proven                                          
══════════════════════                                          
                                                                
For each count from 2 to 16,   the grey levels that lie farthest
apart, found by an exact method.                                
                                                                
By SZIEBERTH Ádám · 2026-12-04                                  
────────────────────────────────────────────────────────────────
                                                                
Which N  shades of  grey,  black  and white  included,  are  the
easiest to tell apart?  The GRAYSCALE palettes answer this for N
from 2 to 16, and they are the backbone of every CVF palette.   
                                                                
The question is put exactly:  choose N of the 256 greys of 8-bit
sRGB, black and white among them, so that the smallest CIEDE2000
difference between any two is as  large as possible.  Ties go to
the palette whose other differences are larger.                 
                                                                
                                                                
                                                                
---------------------- [ THE COLLECTION ] ----------------------
                                                                
═══╤══════════════════════════════════╤════════╤════════════    
 N │ Levels                           │   ΔE00 │ Files          
───┼──────────────────────────────────┼────────┼────────────    
 2 │ ████                             │ 100.00 │ hex pal png    
 3 │ ██████                           │  36.49 │ hex pal png    
 4 │ ████████                         │  25.34 │ hex pal png    
 5 │ ██████████                       │  18.54 │ hex pal png    
 6 │ ████████████                     │  14.98 │ hex pal png    
 7 │ ██████████████                   │  12.36 │ hex pal png    
 8 │ ████████████████                 │  10.65 │ hex pal png    
 9 │ ██████████████████               │   9.25 │ hex pal png    
10 │ ████████████████████             │   8.22 │ hex pal png    
11 │ ██████████████████████           │   7.39 │ hex pal png    
12 │ ████████████████████████         │   6.72 │ hex pal png    
13 │ ██████████████████████████       │   6.15 │ hex pal png    
14 │ ████████████████████████████     │   5.67 │ hex pal png    
15 │ ██████████████████████████████   │   5.21 │ hex pal png    
16 │ ████████████████████████████████ │   4.82 │ hex pal png    
                                                                
The 2021  palettes were found by  a heuristic search  that could
not promise  the best answer.   The exact method  below confirms
that it found the best one in  every case:  the new palettes are
identical to the old ones.                                      
                                                                
                                                                
                                                                
------------------------ [ THE METHOD ] ------------------------
                                                                
The method  is exact,  and all  fifteen sizes take well  under a
second.                                                         
                                                                
 1. Between two  greys,  CIEDE2000 grows  strictly with  the gap
    between their levels,   which was checked for all  256 × 256
    pairs.  So when the levels are  sorted,  the weakest pair is
    always a pair of neighbours.                                
 2. The task  becomes a bottleneck path:   walk from level  0 to
    level 255 in N − 1 steps,   making the shortest step as long
    as possible. Dynamic programming solves it, one max-min pass
    over the table of differences per step.                     
 3. All palettes that  reach that best minimum  are then listed,
    and the tie-break picks the winner.                         
                                                                
The  tests compare  the dynamic  program  with plain  exhaustive
search for 3, 4 and 5 greys.                                    
                                                                
                                                                
                                                                
--------------------- [ NO ROOM TO SPARE ] ---------------------
                                                                
Up to 15 greys there is exactly one best palette, and the others
have less  than one 8-bit step  of slack.  For the  CVF palettes
this means that fixing their greys to the GRAYSCALE levels costs
grayscale vision nothing,  but it  leaves the colours no freedom
on  the grey  axis  at all.   Whether giving  up  a little  grey
difference  would buy  more for  the  other visions  is an  open
question for a later edition.                                   
                                                                
The palettes are  made by cvf-palettes,  like  the CVF palettes,
and they are in the public domain like them (CC0 1.0).          
                                                                
                                                                
                                                                
-------------------------- [ FILES ] ---------------------------
                                                                
Each palette comes as one hex code per line, a JASC-PAL palette,
and a PNG strip with one pixel per grey. A text file lists every
pair with its difference, the weakest first.                    
                                                                
────────────────────────────────────────────────────────────────
© 2026 SZIEBERTH Ádám                                     GitHub