Draw the Ubuntu Logo with Tikz
You can create the gaps in the ring by drawing lines in the background color. In a similar manner, the circles on the outside can be drawn:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[baseline=0]
\draw[black, line width=2mm] (0, 0) circle (1.1);
\draw[white, line width=2mm, overlay]
\foreach \a in {0, 120, 240} {
(0, 0) -- ++(\a:1.3)
}
;
\end{tikzpicture}\qquad
\begin{tikzpicture}[baseline=0]
\fill[black] (0, 0) circle(1.2);
\foreach \a in {60, 180, 300} {
\fill[white] (\a:1.35) circle (.4);
\fill[black] (\a:1.35) circle (.3);
}
\end{tikzpicture}
\end{document}
The logo page of Ubuntu says:
The master logo is supplied as artwork and should never be altered, distorted or re-created in any way.
Trying to draw the logo to learn TikZ in privacy is probably ok, but such a "re-creation" is not permitted to be used very likely.
Also there is no much need, because the logos are provided as SVG files.
The SVG data can even be used in TikZ, e.g.: the white on orange version consists of two tags <path fill="..." d="..."/>
. The first draws a filled colored circle, the second puts the white elements inside.
This can be easily translated to TikZ:
\documentclass{article}
\documentclass{article}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{svg.path}
\begin{document}
\begin{tikzpicture}
\definecolor{ubuntu-orange}{HTML}{DD4814}
\fill[ubuntu-orange] svg {...};
\fill[white] svg {...};
\end{tikzpicture}
\end{document}
The material inside the curly braces after svg
is the contents of the attribute d
of the tag <path>
without quotes.
Here's a simple \foreach
command to draw the Circle of Friends.
Output
Code
\documentclass[margin=10pt]{standalone}
\usepackage{graphicx}
\usepackage{tikz}
\pgfdeclarelayer{fg}
\pgfsetlayers{main,fg}
\newcommand\rad{3cm}
\definecolor{myred}{RGB}{212,0,0}
\definecolor{myorange}{RGB}{244,72,0}
\definecolor{myyellow}{RGB}{251,139,0}
\newcommand{\hug}[3]{
\begin{scope}[shift={(0,0)}, rotate=#1]
\draw[#2, line width=1.5cm] (\rad,0) arc (0:120:\rad) node[circle, fill=#3, minimum size=1.8cm, draw=white, line width=2.8mm] at (57.5:\rad*1.2) {};
\begin{pgfonlayer}{fg}\node[rectangle, fill=white,rotate=#1, minimum height=3mm, minimum width=1.6cm] at (\rad,0) {};\end{pgfonlayer}
\end{scope}
}
\begin{document}
\begin{tikzpicture}
\foreach \angle/\cola/\colb in {0/myorange/myred, 120/myyellow/myorange, 240/myorange/myyellow}{
\hug{\angle}{\cola}{\colb}
}
\end{tikzpicture}
\end{document}