I develop my characters' personalities based on a lot of different factors, but I first chose character types that would play off each other and create interesting dynamics, as well as further the plot I had in mind and allow me to explore the themes I wanted in my story.
I wanted my story to have themes of identity, family bonds, love, loss of innocence, purity and corruption, with a message of peace, acceptance, and sacrifice. My characters reflect that, and act as foils to each other, encouraging character growth and allowing me to communicate a certain message through their individual arcs.
One character is defined by fear, anxiety, and desire for control, but learns to overcome this by developing a mindset of acceptance and inner peace. Another character wants to fulfill other people's desires and expectations for her, but learns to be true to her self, do what she knows is right, and stop living to please others. My favorite character also goes through an arc of discovering his own identity, standing up for himself, and gaining confidence in his own self-worth and inherent value. So... their character traits come from their roles in the story.
The arcs and traits themselves are based on me, the things I've learned in my life, and on family members, friends, and other fictional characters who have inspired me. :]