You can withdraw the contributions from a Roth IRA without penalty as long as you've met the 5 year vesting period. Any earnings withdrawn prematurely would be subject to tax and penalty.
Yes, I should have clarified that: I meant the earnings, not the original contributions.