The function ColorData “gives a function that generates colors”, its output is not really the periodic table.
In[]:=
{ColorData["SunsetColors","Panel"],ColorData["AvocadoColors","Panel"]}
Out[]=
,
However, there is the function which you can use to get the atomic number:
ElementData,
In[]:=
ElementData["Carbon","AtomicNumber"]
Out[]=
6
There is also an example of a plot of the periodic table in the documentation (in the Applications sections) of the function ElementData. (Check documentation here: .) Also, there are some examples here: