index log-L hex rgb 0 -3.00 #000000 (0, 0, 0) black 1 -2.58 #1D2B53 (29, 43, 83) dark-blue 2 -2.17 #7E2553 (126, 37, 83) dark-purple 3 -1.47 #008751 (0, 135, 81) dark-green 4 -1.61 #AB5236 (171, 82, 54) brown 5 -1.91 #5F574F (95, 87, 79) dark-grey 6 -0.52 #C2C3C7 (194, 195, 199) light-grey 7 -0.05 #FFF1E8 (255, 241, 232) white 8 -1.32 #FF004D (255, 0, 77) red 9 -0.65 #FFA300 (255, 163, 0) orange 10 -0.15 #FFEC27 (255, 236, 39) yellow 11 -0.50 #00E436 (0, 228, 54) green 12 -0.85 #29ADFF (41, 173, 255) blue 13 -1.38 #83769C (131, 118, 156) indigo 14 -0.86 #FF77A8 (255, 119, 168) pink 15 -0.32 #FFCCAA (255, 204, 170) peach 128 -2.78 #291814 (41, 24, 20) brown-black 129 -2.77 #111D35 (17, 29, 53) navy 130 -2.59 #422136 (66, 33, 54) aubergine 131 -2.12 #125359 (18, 83, 89) dark-teal 132 -2.22 #742F29 (116, 47, 41) dark-brown 133 -2.40 #49333B (73, 51, 59) purple-grey 134 -1.15 #A28879 (162, 136, 121) mushroom 135 -0.14 #F3EF7D (243, 239, 125) straw 136 -1.77 #BE1250 (190, 18, 80) raspberry 137 -0.99 #FF6C24 (255, 108, 36) deep-orange 138 -0.35 #A8E72E (168, 231, 46) yellow-green 139 -0.96 #00B543 (0, 181, 67) shamrock 140 -1.85 #065AB5 (6, 90, 181) medium-blue 141 -1.96 #754665 (117, 70, 101) grape 142 -0.96 #FF6E59 (255, 110, 89) salmon 143 -0.65 #FF9D81 (255, 157, 129) coral index log-L hex rgb values and names for colors 0-15 from https://pico-8.fandom.com/wiki/Graphics - names from Roman Zolotarev's PICO-8 palette reference names for colors 128-143 selected by packbat using https://klaash.github.io/xkcdcolorpicker/ as guide/inspiration The log-L values in the table are a measure of brightness based on the Web Content Accessibility Guidelines (WCAG) 2.0 - see footnote. Nothing replaces testing, but for a starting point, differences in log-L measure contrast as follows: * 1.10-1.50 corresponds to low (but still sometimes clear) contrast * 1.50-1.95 corresponds to medium contrast * 1.95+ corresponds to high contrast So, for example: * 1 (dark-blue) and 3 (dark-green) have log-Ls of -2.58 and -1.47, a difference of 1.11 and therefore low contrast. * 4 (brown) and 7 (white) have log-Ls of -1.61 and -0.05, a difference of 1.56 and therefore medium contrast. * 2 (dark-purple) and 10 (yellow) have log-Ls of -2.17 and -0.15, a difference of 2.02 and therefore high contrast. For convenience, a list of all colors sorted by log-L: 0 -3.00 black 128 -2.78 brown-black 129 -2.77 navy 130 -2.59 aubergine 1 -2.58 dark-blue 133 -2.40 purple-grey 132 -2.22 dark-brown 2 -2.17 dark-purple 131 -2.12 dark-teal 141 -1.96 grape 5 -1.91 dark-grey 140 -1.85 medium-blue 136 -1.77 raspberry 4 -1.61 brown 3 -1.47 dark-green 13 -1.38 indigo 8 -1.32 red 134 -1.15 mushroom 137 -0.99 deep-orange 142 -0.96 salmon 139 -0.96 shamrock 14 -0.86 pink 12 -0.85 blue 143 -0.65 coral 9 -0.65 orange 6 -0.52 light-grey 11 -0.50 green 138 -0.35 yellow-green 15 -0.32 peach 10 -0.15 yellow 135 -0.14 straw 7 -0.05 white The table is split between 4 (brown) and 3 (dark green) because this point represents halfway between white (7) and black (0). ==== footnote: The WCAG2 guidelines for visual presentation of text and images of text - https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast - give, first, a set of guidelines on what contrast ratios meet a minimum and an enhanced contrast level for normal and large-scale text: - minimum for large-scale: 3:1 contrast ratio - enhanced for large-scale and minimum for normal: 4.5:1 - enhanced for normal: 7:1 ...and second, a set of equations for calculating luminance and then calculating contrast ratio from this. The luminance equations are somewhat involved, but given luminances L1 and L2, the contrast ratio is simply contrast ratio = (L1+0.05)/(L2+0.05) In essence, then, as long as you know (L+0.05) for each color in the palette, you can find the contrast ratio between any pair with multiplication and division. But you know what's easier than multiplication and division? Addition and subtraction. ln contrast ratio = ln (L1+0.05) - ln (L2+0.05) ln 3 = 1.10 ln 4.5 = 1.50 ln 7 = 1.95 ...and that is where the log-L numbers and the contrast thresholds come from in the above.