Code cleanup and optimizations

- preview will now only display when there is valid input
- fixed issue where saved colors title was displayed when no colors had
been saved
- added color value check function