The web-safe palette

The 216 colors that late-1990s browsers could show on a 256-color display without dithering, and what a photograph looks like when it is forced into them.

216 colors: a 6 × 6 × 6 cube

Every channel takes one of six levels, 00 33 66 99 CC FF, so every web-safe color can be written in three hex digits: #369 is #336699. Each slice below is one red level; in a slice, green grows down the rows and blue grows across the columns. Labels are black or white, whichever contrasts more with the swatch; the lowest label contrast is 4.66:1, white on #c39.

Red 00
  1. #000
  2. #003
  3. #006
  4. #009
  5. #00c
  6. #00f
  7. #030
  8. #033
  9. #036
  10. #039
  11. #03c
  12. #03f
  13. #060
  14. #063
  15. #066
  16. #069
  17. #06c
  18. #06f
  19. #090
  20. #093
  21. #096
  22. #099
  23. #09c
  24. #09f
  25. #0c0
  26. #0c3
  27. #0c6
  28. #0c9
  29. #0cc
  30. #0cf
  31. #0f0
  32. #0f3
  33. #0f6
  34. #0f9
  35. #0fc
  36. #0ff
Red 33
  1. #300
  2. #303
  3. #306
  4. #309
  5. #30c
  6. #30f
  7. #330
  8. #333
  9. #336
  10. #339
  11. #33c
  12. #33f
  13. #360
  14. #363
  15. #366
  16. #369
  17. #36c
  18. #36f
  19. #390
  20. #393
  21. #396
  22. #399
  23. #39c
  24. #39f
  25. #3c0
  26. #3c3
  27. #3c6
  28. #3c9
  29. #3cc
  30. #3cf
  31. #3f0
  32. #3f3
  33. #3f6
  34. #3f9
  35. #3fc
  36. #3ff
Red 66
  1. #600
  2. #603
  3. #606
  4. #609
  5. #60c
  6. #60f
  7. #630
  8. #633
  9. #636
  10. #639
  11. #63c
  12. #63f
  13. #660
  14. #663
  15. #666
  16. #669
  17. #66c
  18. #66f
  19. #690
  20. #693
  21. #696
  22. #699
  23. #69c
  24. #69f
  25. #6c0
  26. #6c3
  27. #6c6
  28. #6c9
  29. #6cc
  30. #6cf
  31. #6f0
  32. #6f3
  33. #6f6
  34. #6f9
  35. #6fc
  36. #6ff
Red 99
  1. #900
  2. #903
  3. #906
  4. #909
  5. #90c
  6. #90f
  7. #930
  8. #933
  9. #936
  10. #939
  11. #93c
  12. #93f
  13. #960
  14. #963
  15. #966
  16. #969
  17. #96c
  18. #96f
  19. #990
  20. #993
  21. #996
  22. #999
  23. #99c
  24. #99f
  25. #9c0
  26. #9c3
  27. #9c6
  28. #9c9
  29. #9cc
  30. #9cf
  31. #9f0
  32. #9f3
  33. #9f6
  34. #9f9
  35. #9fc
  36. #9ff
Red CC
  1. #c00
  2. #c03
  3. #c06
  4. #c09
  5. #c0c
  6. #c0f
  7. #c30
  8. #c33
  9. #c36
  10. #c39
  11. #c3c
  12. #c3f
  13. #c60
  14. #c63
  15. #c66
  16. #c69
  17. #c6c
  18. #c6f
  19. #c90
  20. #c93
  21. #c96
  22. #c99
  23. #c9c
  24. #c9f
  25. #cc0
  26. #cc3
  27. #cc6
  28. #cc9
  29. #ccc
  30. #ccf
  31. #cf0
  32. #cf3
  33. #cf6
  34. #cf9
  35. #cfc
  36. #cff
Red FF
  1. #f00
  2. #f03
  3. #f06
  4. #f09
  5. #f0c
  6. #f0f
  7. #f30
  8. #f33
  9. #f36
  10. #f39
  11. #f3c
  12. #f3f
  13. #f60
  14. #f63
  15. #f66
  16. #f69
  17. #f6c
  18. #f6f
  19. #f90
  20. #f93
  21. #f96
  22. #f99
  23. #f9c
  24. #f9f
  25. #fc0
  26. #fc3
  27. #fc6
  28. #fc9
  29. #fcc
  30. #fcf
  31. #ff0
  32. #ff3
  33. #ff6
  34. #ff9
  35. #ffc
  36. #fff

A photograph, forced into the palette

The same 800 × 533 photograph three ways: as the original JPEG, with every pixel snapped to the nearest web-safe color, and with Floyd–Steinberg dithering, which spreads each pixel's rounding error onto its neighbors so that the eye averages the speckles back into the missing colors. Both use only the 216 colors above.

Drawing the palette versions needs JavaScript and canvas; without them, only the original shows.

A snow-capped mountain behind a forested shore, reflected in a still lake under a pale lavender sky.
Original JPEG
Colors
…
Bytes
…
Nearest web-safe color, no dithering
Colors
…
As PNG
…
Web-safe, Floyd–Steinberg dithering
Colors
…
As PNG
…

Magnified four times

A 100 × 66 pixel patch of sky and snow from each version, enlarged with no smoothing, so that each pixel is a square. The bands of the plain version and the speckles of the dithered one are the two ways an 8-bit screen showed colors it did not have.

Original
Nearest color
Dithered