There are other examples of colour coded dragons in fiction, such as Anne McCaffrey, and even Tolkien (dragons are colour coded on an individual basis).
I think it has its root in heraldry though. Most notably the red dragon of the Britons (later Welsh) vs the White dragon of the Saxons, that...