Read this book before 2013.
The protagonist (I think it was a boy) lived in a world where society was divided by colours and each colour had their own city/continent. Each of these colours had their own rules for that part of the world. The main character wants to either change his colour or make it so that all the colours are everywhere. He starts traveling between all of the colours so that he can learn about them while he looks for the being (? Or god? Creature?) that can make him change/make the colours be everywhere.
I remember that in one of the colours there was a limit of how many words someone could speak a day/week, another where everyone could eat whatever they wished for but in the end it was all made of the same thing, and another (blue I think) was submerged and you had to take a train to go to the dome underwater (in this one there was also a mattress that made it so you only had to sleep 4 hours instead of 8 so you had more time to dedicate to other things, I think it was to study).
They did manage to find the being in the end, (with the friends that they made during the journey, if I remember correctly) and it agreed with them to liberate the colours.
It was not a "let's overthrow the government" type of book. It was only a kid going for a adventure with their friends and in fact most of the book is only they learning more about how the others colours live. There wasn't, from what I remember, a caste system: every colour had their own ups and downs on why it was good to live there.