The development of sets and story

While I was reading the 2009 books I noticed that Mata Nui is described as a white and gold character, while the set is actually black and keetorange (the yellow color used in Keetongu). I imagine this was due to the fact that the book was being written before the set received its finalized appearance.

So I was wondering if you could give some insight on how and when the story starts being written in regards to the sets.

Also thank you so much for answering all of our questions, it really shows your immense dedication, and gives us some neat information.