This question already has an answer here:
I read this novel a very long time ago, so the details are hazy, of course. All I clearly remember is that the main character has to sleep in the body of a dead dragon (to escape inclement weather, maybe?) and ends up acquiring powers because of it. I seem to remember that it was a girl, though that may be wrong, and I believe there was something about rainbows. I also think, for some reason, that she was a slave, but again that could be wrong.
Any help would be greatly appreciated!