The color and material of the sphere in the hat finial indicates an official's rank.1 An opaque blue hat knob indicates an official of the 4th rank.
You can see why I decided to portray an official in informal uniform instead of ceremonial or formal dress. ;-) It's much less work, lol. Hats for formal occasions have a hat spike instead of a hat knob,2 and hat quills differentiated status according to color - blue quills for 6th rank and below, peacock quills for 5th rank and above,3 - and the number of 'eyes' in the peacock feathers.4
Formal uniform also required rank badges.5 The ceremonial6 necklace of 108 beads was worn by civil officials of 5th rank and higher, and military officers of 4th rank and above.7