kostafey / organic-green-theme

Bright green color theme for Emacs.
39 stars 5 forks source link

Refactor of organic-green-theme #2

Closed wandersoncferreira closed 4 years ago

wandersoncferreira commented 4 years ago

Hi @kostafey how are you? I would be happy to try to refactor this theme to more modern standard, would be a very nice opportunity to learn how to do it.

I never worked in themes before, could you provide some guidelines and/or examples of how to modernize the theme?

Thanks!

kostafey commented 4 years ago

Hi @wandersoncferreira, thank you. You can use any most popular theme as an example. Like nord-emacs, solarized-emacs, emacs-theme-gruvbox, spacemacs-theme or emacs-doom-themes.

Fist of all, the color set should be defined. organic-green-theme was developed not by a top-down approach, instead it is a set of many ad-hoc fixes that aimed to don't look too nasty :). Different pre-defined color names and direct (RGB) colors used throughout this file, make it looks like a mess. So, all colors should be systemized and defined first, then used for specific faces. Here is a good example: https://github.com/arcticicestudio/nord-emacs/blob/develop/nord-theme.el#L101

Alternatively, you can go a bit more and use autothemer like here: https://github.com/greduan/emacs-theme-gruvbox/blob/master/gruvbox.el#L85 But since organic-green-theme has only one color set, I think it will be redundant.

wandersoncferreira commented 4 years ago

Great, got it! I will find some time tomorrow to look into this in more detail. I was looking at modus-operandi which is the light-theme that I was using before and seems like he is compliant with this more systemic approach.

One thing that I noticed is that most packages have to be dealt with in a very explicit way, for example, if we want to extend support to helm, ivy, slack-mode, or whatever... we need to explicitly change the exposed faces of these packages.

For some reason I never thought about this rsrs a lot of work.