ColorQ

ColorQ[color]
yields True if color is a valid color directive and False otherwise.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

A valid color:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

An expression with a color directive head that is not a valid color:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2014
(10.0)