Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some base colors not swapped between light and dark #16

Closed
jibsen opened this issue May 19, 2013 · 5 comments
Closed

Some base colors not swapped between light and dark #16

jibsen opened this issue May 19, 2013 · 5 comments

Comments

@jibsen
Copy link
Contributor

jibsen commented May 19, 2013

There are a number of places where the base colors are not swapped between the light and dark theme - for instance entity.name.function.c, which results in C function names having the same color as comments when using the dark theme.

It might be helpful to fix one theme and then produce the other automatically by substitution of the base colors, to avoid them "getting out of sync"?

@braver
Copy link
Owner

braver commented May 19, 2013

Yes, it would be awesome to sync automatically. I always do a manual check
in Beyond Compare, but it's hard to keep them from deviating. So, if anyone
were to put a script together that does that and perhaps some validations,
that'd really help the reliability of the theme development.

On 19 mei 2013, at 16:02, "Jørgen Ibsen" [email protected] wrote:

There are a number of places where the base colors are not swapped between
the light and dark theme - for instance entity.name.function.c, which
results in C function names having the same color as comments when using
the dark theme.

It might be helpful to fix one theme and then produce the other
automatically by substitution of the base colors, to avoid them "getting
out of sync"?


Reply to this email directly or view it on
GitHubhttps://github.com//issues/16
.

@jibsen
Copy link
Contributor Author

jibsen commented May 19, 2013

FWIW, here is a quick Perl script I used to swap base colors so I could check for differences:

my %invbase = (
    '#002b36' => '#fdf6e3',
    '#073642' => '#eee8d5',
    '#586e75' => '#93a1a1',
    '#657b83' => '#839496',
    '#839496' => '#657b83',
    '#93a1a1' => '#586e75',
    '#eee8d5' => '#073642',
    '#fdf6e3' => '#002b36',
);

while (<>) {
    s/#002b36|#073642|#586e75|#657b83|#839496|#93a1a1|#eee8d5|#fdf6e3/$invbase{"\L$&"}/ig;
    print $_;
}

@jibsen
Copy link
Contributor Author

jibsen commented Aug 8, 2014

I started on a minimal Solarized theme the other day, to see if it would be possible to limit the rules to more or less just the root groups. I got sufficiently annoyed with XML that I wrote a Python script to generate themes from YAML sources.

This is quite a big change, but if you are interested I made a brach showing how both theme files could be generated from one set of source files (just as an example):

https://github.com/jibsen/Solarized/tree/yamltotm_build

@braver
Copy link
Owner

braver commented Aug 14, 2014

I've tried something similar, keeping the theme file small, with the themes I've created myself. The problems start when you want to support a lot of languages, because the language files deviate from the rules in subtle ways. Usually in ways that make sense, because the same patterns don't always return in the same way. And I like the syntax highlighting especially where it highlights subtle differences in syntaxes in a language: I don't need colours to see that $foo is a variable.

So, anyway, we could always put your simplified themes in the package alongside the "traditional" versions. Just submit pull requests for the files and I'll pull them in.

@braver
Copy link
Owner

braver commented Feb 10, 2015

I've seen some other efforts that use a workable syntax like cson or yaml to build themes and yeah, that makes a lot of sense. However, I just went for some elbow grease and cleaned the themes out. Really for another couple years of use I think ;)

@braver braver closed this as completed Feb 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants