17
votes
2answers
338 views

Pattern that matches colors

Suppose I'm writing a function that takes a color as a parameter; for example: drawShape[color_] := Graphics[{Style[Disk[], color]}]; But if the caller inputs an ...
4
votes
2answers
228 views

Formatting text through pattern matching

I am trying to format some text based on some patterns. ...