High-end printers began decorating the edges of books as the craft developed, including dyeing and gilding the edges, but in the 17th century, artisans began creating fore-edge paintings that could only be seen when books were fanned. Below is another example:
Holly Dunn looks at some examples, including a few modern ones.
• Fore-edge Painting (via Cornell University Library)