Foundation.?

How do you know what kind of foundation tone to use ? Like a lighter one than my skin color or darker ?