Let $G$ be a graph with the following properties. $C$ is a set of colors. The nodes of $G$ are $C \choose 2$. For any node $v$, the neighborhood of $v$ is rainbow -- that is, for any two nodes $x, y$ adjacent to $v$, the two colors of $x$ are different from the two colors of $y$.
What is the maximum number of edges $G$ might have (up to constant factors -- big O is fine)? Have these graphs been studied before?