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 edgenode $(u, v) \in G$$v$, the neighborhood of $v$ is rainbow -- that is, for any two nodes $x, y$ adjacent to $v$, the two colors of $u$$x$ are different from the two colors of $v$$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?