Get colors of a theme

Is it possible to have the colors of a theme in a JSON ?
Like for example:

{
  "keyword": "#3322F3",
  ...
} 

?

Not unless the theme exports them as such.