michaeljolley / onlythemes

VS Code themes that match your personality profile.
https://marketplace.visualstudio.com/items?itemName=builders-club.onlythemes
MIT License
12 stars 9 forks source link

Standardize theme color data #24

Closed michaeljolley closed 3 years ago

michaeljolley commented 3 years ago

@parithon please close if I'm incorrect, but I think the object we're saving for a theme is different if the theme is a plist vs json.

Let's define what we want that theme object to look like so we can standardize it from either. I think we'll need that before using ML on the dataset.

parithon commented 3 years ago

You're not wrong. I do believe the colors property will be available in both cases but I don't have enough knowledge on the other aspects. I'll attempt to do some research.

parithon commented 3 years ago

From my limited research, it appears we should collect the following information:

If my understanding is correct, .tmTheme or TextMate themes should consist of token colors. Therefore, I suggest we populate the end object as:

{
   type: 'vs-dark|vs-light',
   colors: { ... any colors provided by the .json theme }
   tokenColors: { ... any tokenColors provided by the .json theme or the results of the .tmTheme parser }
}

It is important to note that the tokenColors may point to a .tmTheme file (which we should parse) or be an object with the attributes inline.

michaeljolley commented 3 years ago

I agree

michaeljolley commented 3 years ago

After looking through the color options in the API I'm thinking about simplifying what we store to just a dozen colors.