The only way I can take a compliment is by responding with one... So if someone says "You're so pretty" or something I say something like "Well just look at you, rocking that *insert random item of clothing or accessory*" Or I can reply with something to downplay it, but not too self deprecating sometimes also, like "I love your hair, it's such a great color" I can respond to with "Thanks I am really fond of the color but it's a mess to make it do anything but be straight!"
I try my hardest to just take it without deflecting though. My fiance likes to tell me if I don't start just accepting the compliments he'll stop giving them to me; I know he never would, but it's a good method to make me try a little harder and I appreciate it!