color algorithm