Yesterday I came across this question: How to draw Venn diagrams (especially: complements) in LaTeX. I was introduced to the idea of intersecting circles and only filling in specific sections defined by the boundaries of the lines of the intersecting circles. Some examples are given in the above link but I began experimenting myself and was able to generate a large number of patterns:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[fill=blue]
%\draw[gray!30] (-2,-2) grid (2,2) (0,0);
\begin{scope}
\clip (330:0.75) circle (1);
\fill (210:0.75) circle (1);
\fill (90:0.75) circle (1);
\end{scope}
\begin{scope}
\clip (330:0.75) circle (1) (210:0.75) circle (1);
\fill (90:0.75) circle (1);
\end{scope}
\draw[color=black] (210:0.75) circle (1) node[]{A};
\draw[color=black] (330:0.75) circle (1) node[]{B};
\draw[color=black] (90:0.75) circle (1) node[]{C};
\begin{scope}[xshift=3.5cm]
\clip (330:0.75) circle (1) (210:0.75) circle (1);
\fill (90:0.75) circle (1);
\end{scope}
\draw[color=black,xshift=3.5cm] (210:0.75) circle (1) node[]{A};
\draw[color=black,xshift=3.5cm] (330:0.75) circle (1) node[]{B};
\draw[color=black,xshift=3.5cm] (90:0.75) circle (1) node[]{C};
\begin{scope}[xshift=7cm]
\clip (90:0.75) circle (1) (210:0.75) circle (1);
\fill (330:0.75) circle (1);
\end{scope}
\draw[color=black,xshift=7cm] (210:0.75) circle (1) node[]{A};
\draw[color=black,xshift=7cm] (330:0.75) circle (1) node[]{B};
\draw[color=black,xshift=7cm] (90:0.75) circle (1) node[]{C};
\begin{scope}[xshift=10.5cm]
\clip (90:0.75) circle (1) (330:0.75) circle (1);
\fill (210:0.75) circle (1);
\end{scope}
\draw[color=black,xshift=10.5cm] (210:0.75) circle (1) node[]{A};
\draw[color=black,xshift=10.5cm] (330:0.75) circle (1) node[]{B};
\draw[color=black,xshift=10.5cm] (90:0.75) circle (1) node[]{C};
\begin{scope}[even odd rule,yshift=-3.5cm]
\clip (90:0.75) circle (1) (330:0.75) circle (1);
\fill (210:0.75) circle (1);
\end{scope}
\draw[color=black,yshift=-3.5cm] (210:0.75) circle (1) node[]{A};
\draw[color=black,yshift=-3.5cm] (330:0.75) circle (1) node[]{B};
\draw[color=black,yshift=-3.5cm] (90:0.75) circle (1) node[]{C};
\begin{scope}[even odd rule,yshift=-3.5cm, xshift=3.5cm]
\clip (330:0.75) circle (1) (210:0.75) circle (1);
\fill (90:0.75) circle (1);
\end{scope}
\draw[color=black,yshift=-3.5cm,xshift=3.5cm] (210:0.75) circle (1) node[]{A};
\draw[color=black,yshift=-3.5cm,xshift=3.5cm] (330:0.75) circle (1) node[]{B};
\draw[color=black,yshift=-3.5cm,xshift=3.5cm] (90:0.75) circle (1) node[]{C};
\begin{scope}[even odd rule,yshift=-3.5cm, xshift=7cm]
\clip (210:0.75) circle (1) (90:0.75) circle (1);
\fill (330:0.75) circle (1);
\end{scope}
\draw[color=black,yshift=-3.5cm,xshift=7cm] (210:0.75) circle (1) node[]{A};
\draw[color=black,yshift=-3.5cm,xshift=7cm] (330:0.75) circle (1) node[]{B};
\draw[color=black,yshift=-3.5cm,xshift=7cm] (90:0.75) circle (1) node[]{C};
%other ideas: clipping 2 circles and filling 2. that fills the non-intersected region of one circle, and only the intersection of the other two circles.
\begin{scope}[even odd rule,yshift=-3.5cm, xshift=10.5cm]
\clip (210:0.75) circle (1);
\fill (330:0.75) circle (1) (90:0.75) circle (1);
\end{scope}
\begin{scope}[even odd rule,yshift=-3.5cm, xshift=10.5cm]
\clip (330:0.75) circle (1);
\fill (210:0.75) circle (1) (90:0.75) circle (1);
\end{scope}
\begin{scope}[even odd rule,yshift=-3.5cm, xshift=10.5cm]
\clip (90:0.75) circle (1);
\fill (330:0.75) circle (1) (210:0.75) circle (1);
\end{scope}
\draw[color=black,yshift=-3.5cm,xshift=10.5cm] (210:0.75) circle (1) node[]{A};
\draw[color=black,yshift=-3.5cm,xshift=10.5cm] (330:0.75) circle (1) node[]{B};
\draw[color=black,yshift=-3.5cm,xshift=10.5cm] (90:0.75) circle (1) node[]{C};
\begin{scope}[even odd rule,yshift=-7cm]
\clip (210:0.75) circle (1);
\fill (330:0.75) circle (1) (90:0.75) circle (1) (210:0.75) circle (1);
\end{scope}
\draw[color=black,yshift=-7cm] (210:0.75) circle (1) node[]{A};
\draw[color=black,yshift=-7cm] (330:0.75) circle (1) node[]{B};
\draw[color=black,yshift=-7cm] (90:0.75) circle (1) node[]{C};
\begin{scope}[even odd rule,yshift=-7cm, xshift=3.5cm]
\clip (210:0.75) circle (1) (90:0.75) circle (1);
\fill (330:0.75) circle (1) (210:0.75) circle (1);
\end{scope}
\draw[color=black,yshift=-7cm, xshift=3.5cm] (210:0.75) circle (1) node[]{A};
\draw[color=black,yshift=-7cm, xshift=3.5cm] (330:0.75) circle (1) node[]{B};
\draw[color=black,yshift=-7cm, xshift=3.5cm] (90:0.75) circle (1) node[]{C};
\begin{scope}[even odd rule,yshift=-7cm, xshift=7cm,fill=purple]
\clip (210:0.75) circle (1) (90:0.75) circle (1) (330:0.75) circle (1);
\fill[red] (90:0.75) circle (1) (330:0.75) circle (1) (210:0.75) circle (1) (210:1);
\end{scope}
\draw[color=black,yshift=-7cm, xshift=7cm] (210:0.75) circle (1) node[]{A};
\draw[color=black,yshift=-7cm, xshift=7cm] (330:0.75) circle (1) node[]{B};
\draw[color=black,yshift=-7cm, xshift=7cm] (90:0.75) circle (1) node[]{C};
\begin{scope}[nonzero rule,yshift=-7cm, xshift=10.5cm]
\clip (210:0.75) circle (1) (90:0.75) circle (1);
\fill (330:0.75) circle (1) (210:0.75) circle (1);
\end{scope}
\draw[color=black,yshift=-7cm, xshift=10.5cm] (210:0.75) circle (1) node[]{A};
\draw[color=black,yshift=-7cm, xshift=10.5cm] (330:0.75) circle (1) node[]{B};
\draw[color=black,yshift=-7cm, xshift=10.5cm] (90:0.75) circle (1) node[]{C};
\end{tikzpicture}
\begin{tikzpicture}[opacity=0.5]
\draw[color=black, fill=red] (210:0.75) circle (1) node[]{A};
\draw[color=black,fill=green] (330:0.75) circle (1) node[]{B};
\draw[color=black,fill=blue] (90:0.75) circle (1) node[]{C};
\draw[color=black, fill=gray!10,xshift=3.5cm] (210:0.75) circle (1) node[]{A};
\draw[color=black,fill=gray!10,xshift=3.5cm] (330:0.75) circle (1) node[]{B};
\draw[color=black,fill=gray!10,xshift=3.5cm] (90:0.75) circle (1) node[]{C};
\end{tikzpicture}
\end{document}
The one pattern I haven't been able to figure out how to make is having only the intersection of the three circles filled. (Or the reverse: having only the intersected region of the three circles unfilled.) How can this be done? And if it can be done, can it be done with the general pattern of code I was producing myself (i.e. just some scope, possibly some use of the even odd rule) but in a way I haven't figured out yet?
EDIT: OK, so I figured out one way to do it (and independently @Steven B. Segletes came up with the same idea below), and that was just to make some white-filled shapes and put them over the blue regions in the right place so that only the blue in the middle would show. Here's what I got:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[,fill=blue]
\begin{scope}[even odd rule,yshift=-7cm]
\clip (210:0.75) circle (1);
\fill (330:0.75) circle (1) (90:0.75) circle (1) (210:0.75) circle (1);
\end{scope}
\draw[yshift=-6.6cm,xshift=-26,rotate=45,fill=white,color=white] (-1.5,-2) rectangle (-0,0.5);
\draw[yshift=-5cm,xshift=-39,rotate=45,fill=white,color=white] (-1.5,-2) rectangle (-0,0.5);
\draw[color=black,yshift=-7cm] (210:0.75) circle (1) node[]{A};
\draw[color=black,yshift=-7cm] (330:0.75) circle (1) node[]{B};
\draw[color=black,yshift=-7cm] (90:0.75) circle (1) node[]{C};
\end{tikzpicture}
\end{document}
Still, this method seems inefficient (took me a few minutes to position those rectangles in just the right place) and takes away from the use of mathematical precision (as opposed to the manual positioning and colouring I could do on, say, Photoshop or LucidChart) that I like about using something like Tikz. Is there a better way to do this?