Can you solve it? Logicians in a line

A logic puzzle commemorating UNESCO's World Logic Day involves logicians wearing colored hats. They must deduce their hat color by observing others. A strategy must be devised for at least nine logicians to correctly state their hat color.