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
ElementData
name
,
property

which you can use to get the atomic number:
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:
https://reference.wolfram.com/language/ref/ElementData.html
.) Also, there are some examples here:
https://www.wolfram.com/language/12/food-and-nutrition-entities/visualize-nutrition-in-the-periodic-table-of-eleme
nts.html?product=mathematica
​