Ugliness is a lack of harmony, assuredly. And evil is the same thing of course.
Without discontentment, without revolt, you can never attain harmony. It is a necessary stage, which must be gone through by everyone.