It's happened to all of us. We get home and discover to our horror that the yarn we just bought is not all the same dye lot. If it came from your LYS you should be able to return and exchange the balls. If they don't have enough in stock for your project they may be able to order more in for you.
In my case it happened twice, once when I was buying at a no return sale and on another occasion when a shop was going out of business. So what do you do? First take a deep calming breath and promise yourself to always check ball bands before you buy. You already have the yarn, it's not returnable, so now what do you do?
First, decide this is a challenge and your creative side needs to kick in. There are ways to get around varying dye lots and still produce a beautiful project.
Second, examine the yarn in either strong natural light or under a true colour, light bulb. Ott-Lite is probably the most well know brand but there are others. You may be able to clearly see the difference in shade from ball to ball.
Third, separate the balls out according to dye lot. your plan to deal with the challenge needs to consider how many balls you have in each group so you can develop a solution.
Fourth, if you can't see a difference between dye lots, it's time to knit a swatch in stocking stitch, changing from one lot to another. You should be able to see the transition. If not, it's possible the ball band has been mislabeled or that the dye process for your particular colour is very stable and produces consistent results. Again examine under strong light and get a second opinion if you are not sure.
Fifth, think about what you originally planned to use the yarn for. Try to be open minded about this. You might not be able to make the project you imagined.
Sixth, generate fresh ideas to hide the colour variance.
Knit border and bands in one dye lot and main sections in another.
Work from darkest to lightest colours. Alternate between dye lots to soften the transition.
Use texture to hide the difference, light hits stocking stitch very differently than it does any combination of knit and purl stitches.
Choose a garment pattern worked in the round so you can perfectly align the dye lots on the sleeves to the body.
Look for a cuff to cuff design, blending the dye lots as you knit by alternating or using bands of texture.
Think about combining your yarn with another colour or texture of yarn to divide the dye lots up.
Purposely treat the dye lots as stripes. If you do decide to do some sort of striping pattern, keep it as random as possible to avoid getting locked into an exact repeat that might not work out if you run out of one lot before the other.
Combine two strands of yarn (one of each dye lot).
Could you knit several small items out of each dye lot? What about a hat, scarf or mitten set using one dye lot for each item.
Remember you can combine some of these solutions.