Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

Consistent formatting, removing duplicates #31

Open
egeerardyn opened this issue Jul 13, 2016 · 4 comments
Open

Consistent formatting, removing duplicates #31

egeerardyn opened this issue Jul 13, 2016 · 4 comments

Comments

@egeerardyn
Copy link
Contributor

I am in the process of converting the Alpenglow theme to Visual Studio (not Code) and I saw that we often format the colors inconsistently, or some colors differ by a very small amount (e.g. cc7832 vs CC7833 vs cc7732)

I think we should take the time to clean them up:

  • either format everything in upper case or lower case,
  • replace very similar colors with a single one,
  • remove colors that are commented out.

Probably a good first step is to first build a cheat sheet with "Alpenglow" colors and then only use those.

@bmcminn
Copy link
Contributor

bmcminn commented Jul 15, 2016

I was thinking about this... I had a thought about using a master color spec file (ini, json, yaml, something) that we could use to normalize the color values, and then use a placeholder text format ({{ var }}, <%= %>, etc) templating script that we could use in formatting these files and then run the theme assets through a build process that just injects the color variables to a final compiled theme. This is in conjunction with another issue (#5) about build tooling for this project, but with my job hunt the last couple months, haven't had much time devoted to this effort :P

If anyone's curious about drafting up some wishlist build tool ideas in #5, I'd be interested in piecing together a simple build suite.

@egeerardyn
Copy link
Contributor Author

@bmcminn
In general, I think we could have a formal definition of the colorsheet, but I think that templating the themes might be a bridge too far. That makes it harder to integrate with e.g. PackageControl or we would need to mix artifacts and source in the repository (and that leads to a mess, most of the times). I'm rather for just a checking approach (i.e. as in #5):

  • all colors should differ by more than e.g. 5%, and/or
  • all colors should occur in the main list.

Good luck with your job hunt, I know it can take a lot of mental bandwidth.

@vikjam
Copy link
Contributor

vikjam commented Aug 6, 2016

There are a number of similar websites, but Color Hound seems to get the job done for viewing all the colors in an XML file. You can just paste your code from the XML and it spits out all the color palettes. Here's screenshot for Alpenglow-monokai.

colorhound

Packages for Sublime like Color Highlighter can be useful while scrolling around the themes in Sublime.

@egeerardyn
Copy link
Contributor Author

I had a go at it with some regular expressions and MATLAB for some of the theme files.
For those interested, I have exported the data to plotly which produces the following plot (clickable for full dataset).

alpenglow colors 1

I still have to further analyze the data and cluster the colors to approximate those colors with as small a set as possible without sacrificing distinguishable colors.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants