changed: some refactoring
changed: using dark gray or very light gray if overall lightness value is about 0.5