Oh, it's worse than spoiling the ending; I seem to recall that's explained about half-way, maybe 2/3, through the book. :-)
To tell the truth, I have somewhat forgotten; I read the book over 10 years ago. As I recall it's tied to marketing in the Orient 100-150 years ago: yellow is a popular color there, associated with wealth, and royalty; yellow pencils thus became known as the best pencil one could buy, and the association remains even here -- people will buy a yellow #2 more readily than any other color.
The book was fascinating; I heartily recommend it.