Fixed color algorithm and partially implemented Analyze button