colorspaces reworked

- recognition of colors reworked
- minor refactoring