Topological codes are an important class of quantum codes. In this talk, we will give an introduction to two important classes of topological codes: toric codes and color codes. These codes have attracted a lot of attention because of their relevance for fault tolerant quantum computing. We will focus on their connections to graph theory with respect to their properties and decoding. After an overview of these codes, we will show that any 2D color code is locally equivalent to two copies of a (related) toric code. This generalizes previous results which were restricted to translation invariant color codes. Time permitting, we will give an overview of 3D toric codes and color codes, and their relations from a different perspective than 2D codes.