What is wrong with my code? RGB potentiometer
Equality comparison in C and C++ is expressed by == operator. ==, not =. This

if (wavecolor = 0) {


actually assigns zero to your wavecolor variable, thus destroying the value you just read.
The common sense says that you actually need and in your conditions, not or 

if (wavecolor &gt; 0 and wavecolor &lt; 333) {


The or conditions that you curently use are simply always true, which makes them nonsensical.
This is valid syntax

wavecolor &gt; 0 or wavecolor &lt; 333
wavecolor &gt; 0 and wavecolor &lt; 333


but you might want to try using more "canonical" forms

wavecolor &gt; 0 || wavecolor &lt; 333
wavecolor &gt; 0 &amp;&amp; wavecolor &lt; 333


or and and are "alternative" forms of || and &amp;&amp; operators, introduced a long time ago for reasons that are all but obsolete today.
Assuming that you meant and instead of or, in your conditions you managed to "exclude" such values as 333, 667 and 1022 - they wouldn't match any of and conditions. Changing some strict comparisons to non-strict ones might be in order. 
As a side note, in a single-file program all file-scope variables should be either const or static. In your case

const int redpin = 6;
const int greenpin = 3;
const int bluepin = 5;
const int potPin = 0;