Yes, great idea! I love it!
Technically, what you need is violet at the end of the rainbow (purple is a mixture of red and blue, which don't mix in a rainbow).
If you want to include black and white tops, the black would go before the red (outside edge of the primary rainbow, the so-called "Alexander's dark band") and the white after the violet (inside edge of the rainbow). In my novel I named each chapter after a color of the conventional 7 color rainbow, with the prologue named Franja Negra and the epilogue Franja Blanca