Structural coloration by inkjet-printing of optical microcavities and metasurfaces