added functionality shortern colors rgb, optimize code