45

I am working on some book writing. For that I need to draw circle filled with red color.

I tried \circle but it generate black circle only. How can I fill it with color?

  • 1
    use the tikz package – daleif Jan 8 '13 at 9:58
  • Welcome to TeX.sx! Try \circle*. Or add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Qrrbrbirlbel Jan 8 '13 at 10:04
  • 2
    If you've already loaded color or xcolor (or a package that automaticall loads it, such as TikZ) you could also use the \textcolor command, e.g. \textcolor{red}{$\bullet$} – Tom Bombadil Dec 16 '15 at 16:55
60

One easy way would be to use TikZ as in the following MWE

\documentclass[a4paper,12pt]{scrartcl}
\usepackage{tikz}

\begin{document}
Some Text \tikz\draw[red,fill=red] (0,0) circle (.5ex); further text
\end{document}

which produces

enter image description here

Where the first red defines the line style of the drawn circle to be red and the fill=red specifies, that its solid red. You could also use black,fill=red to obtain a red circle with a black border. Finally of course the .5ex is the radius of the circle.

22

Another solution with TikZ, but this one creates a command \tikzcircle to be used in the document:

\newcommand{\tikzcircle}[2][red,fill=red]{\tikz[baseline=-0.5ex]\draw[#1,radius=#2] (0,0) circle ;}%

It takes one mandatory argument, the radius of the circle and an optional argument that helps in customizing the circle's aspect.

The code:

\documentclass[a4paper,11pt]{article}
\usepackage{tikz}

\newcommand{\tikzcircle}[2][red,fill=red]{\tikz[baseline=-0.5ex]\draw[#1,radius=#2] (0,0) circle ;}%

\begin{document}
This is my text \tikzcircle{2pt} followed by \tikzcircle[green, fill=blue]{1.5pt} some other text \tikzcircle[fill=orange]{3pt} and some other text
\end{document}

The result:

enter image description here

  • Note that if you draw the line around the circle instead in addition to filling the interior, the visible diameter of the circle will be one linewidth more than 2*radius. – ndim Jan 8 '13 at 13:18
  • Yes you're right, but I think for the purpose having the exact radius is not such a strict constraint. – Claudio Fiandrino Jan 8 '13 at 13:49
14
\documentclass{article}
\usepackage{xcolor,pict2e}% to allow any radius
\begin{document}
\leavevmode
\put(0,0){\circle{20.6}}\put(0,0){\color{red}\circle*{20}}

\end{document}
13

\newcommand\filledcirc{{\color{red}\bullet}\mathllap{\circ}} gives you a \circ filled with red color. You need usepackage{mathtools} for the \mathllap command.

To change the border color as well, just change the color of the \circ, like so: \newcommand\filledcirc{{\color{red}\bullet}\mathllap{\color{blue}\circ}}.

The advantage over Tikz solutions is that it's much faster.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.