A homology theory for colored graphs