PVC is a useful material for DIY enthusiasts, but it usually only comes in white or grey/black. If you want your wine rack or laptop stand to fit in with your room's decor, you can stain it whatever colour you like using a just a couple of items.
Make Magazine reports that the secret to getting the dye to penetrate the PVC is the Clear Cleaner, a product designed to clean PVC pipe. This penetrating solvent allows petroleum dyes to permanently alter the exterior colour of the PVC pipe. Petroleum dye is available in red, yellow and blue, but the source link below gives you the proportions for making most common colours.
Mix the dye recipe with the Clear Cleaner, mix thoroughly and apply using the applicator that comes in the Clear Cleaner container — you'll probably want to wear gloves for this. Do this quickly and give the work pieces several hours to dry completely.
When the piece is dry it should pass the ‘white glove' test where no colour is transferred when running a gloved hand along the outside of the dyed pipe.