The reason to have dirty hair is so that the color can be better absorbed by the hair shaft.When the hair has not been freshly washed and has been in the sun and blow dried the outside of the hair is open this is called the cuticle .This in turn allows the hair to more readily except the color .
You should then wash and condition with a professional color protecting shampoo and conditioner as these are especially formulated to then close down and seal the cuticle . It is best to leave the hair unwashed for a day or two so that the color can relax into the hair shaft and do it's molecular bonding thing .Of course this all depends on if you are doing a glaze , semi permanent , or demi permanent , or permanent color .
No matter which of these always use cool water , less heat and wash less then you will get the most out of your color.
I also think that it is best to go to the professionals as they have better product and technique remember your hair is an investment in yourself . That being said it is better go to sally's and not the grocery store for your color should you still decide against the professional route .