In my math equations, I'd like to use a circle symbol which has the top and bottom half colored at a specific color. Ideally with a separating line at the diameter. The symbol should also work if I use it as a superscript in math mode.

So something like enter image description here

What would be an approach to achieve that?

1 Answer 1


A solution with TikZ:

  • The size adapts to the current math style. The example uses the size of letter A.

  • The line width decreases with smaller line styles.

Full example:


    \mathord{% change accordingly to the symbol type
  % #1: bottom color
  % #2: top color
  % #3: math style
  % #4: unused
  \@twohalfcircle@dimen=\ht0 %
    - .5\@twohalfcircle@linewidth
    line width=\@twohalfcircle@linewidth,
    \filldraw[fill={#1}] circle[];
      (-\@twohalfcircle@radius, 0)
      -- cycle



  • 1
    Nice. It would be nicer if the line width change according to radius.
    – Sigur
    Commented Aug 15, 2015 at 11:42
  • 1
    @Sigur, yes, I was already preparing it, see the updated answer. Commented Aug 15, 2015 at 11:46
  • Wow, that's pretty nice. I didn't guess how much little tuning there is.
    – Gere
    Commented Aug 15, 2015 at 12:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .