First you should be using if-else style comparisons rather than a bunch of if's. Because if you can't have two colors the user wants, just one.

But that aside, it looks like it would work except when the user gets it wrong. You store their input in 'input' but don't recalculate the 'guess' variable by running through the if's again. So it will always be wrong.

If you had set it up the way I had mentioned it would be much simpler.