Giter VIP home page Giter VIP logo

Comments (38)

senthilbaboo avatar senthilbaboo commented on August 12, 2024 2

I have created a pull request to fix this in the base16 builder: https://github.com/chriskempson/base16-builder/pull/347 by extending the solution of @AnthonyDiGirolamo a bit.

from base16-emacs.

belak avatar belak commented on August 12, 2024 1

Well, I've added another option (and removed the previous one).

For 256 color terminals, there are 3 options:

  • terminal - use the xresources theme
  • base16-shell - use the colors from base16-shell/xresources
  • colors - fall back to converting the html color codes to colors in the 256 colorspace (this one is new).

These can be set using the base16-theme-256-color-source variable.

For people still having trouble using terminal or base16-shell, I'd recommend using colors.

from base16-emacs.

belak avatar belak commented on August 12, 2024 1

The setting changed quite a while back. There's some more information here: https://github.com/belak/base16-emacs/blob/master/base16-theme.el#L17

This may fix it for you: (setq base16-theme-256-color-source "base16-shell")

from base16-emacs.

AnthonyDiGirolamo avatar AnthonyDiGirolamo commented on August 12, 2024

I am having this issue as well. Probably because the themes are defined as hex color values rather than terminal colors. Emacs is trying to match them to the closest 256 color equivalent. I'm pretty new to emacs so I'm not sure how to fix it.

from base16-emacs.

tvjg avatar tvjg commented on August 12, 2024

I'm also trying to figure this out. I'm willing to help if someone could give me some guidance on how to debug. Or at least an up-to-date resource on how emacs handles colors and face -- it's overwhelming to sift through. These issues from solarized seem related:

sellout/emacs-color-theme-solarized#60
sellout/emacs-color-theme-solarized#62

I also noticed that the light themes look pretty close to correct already. If I run (set-background-color "black"), the glaring orange background goes away.

Is this even the right issue tracker @mkaito or should we take this discussion over to base16-shell?

from base16-emacs.

mkaito avatar mkaito commented on August 12, 2024

I just provide this issue for ELPA convenience. Development happens in base16-builder. I am "officially" the maintainer of the emacs template, I guess, but I'm not actually very experienced with emacs themes, especially when it comes to emacs in the console. I've never gotten that to work since we switched to deftheme.

Perhaps if you take discussion over to base16-builder, more people would see it. I'm eager to get this solved, since it also affects my daily workflow.

If it's worth anything, base16-shell also messes vim's colours up.

from base16-emacs.

AnthonyDiGirolamo avatar AnthonyDiGirolamo commented on August 12, 2024

I think I've got a solution. See pull request #13. With that get consistent colors in rxvt and iTerm in OS X.

from base16-emacs.

mkaito avatar mkaito commented on August 12, 2024

That's great! I'm not sure upstream is actually doing anything. Last news I heard was that they wanted to split themes into their own packages/repos, but it seems like nothing has happened since.

from base16-emacs.

senthilbaboo avatar senthilbaboo commented on August 12, 2024

@mkaito As base16-builder project is kind of stale, it is possible for you to generate the new theme files with my pull request and release them to melpa for emacs?

from base16-emacs.

belak avatar belak commented on August 12, 2024

There's a fork of the base16-builder package which solves this issue.

They used this method: auduchinok/base16-builder@77714c2

Alternatively, this repo could switch to using that base16-builder as it seems more active.

from base16-emacs.

belak avatar belak commented on August 12, 2024

This should be resolved in 51b0fcd. It was based off of the base16-xresources colors and should work if you have a base16 terminal scheme in use as well.

However, I haven't tested with the -256 variety, so I'm not closing this just yet.

from base16-emacs.

belak avatar belak commented on August 12, 2024

I believe this has been fixed. I've tried it against the base16-default.dark and base16-default.dark.256 iterm2 color schemes.

Please let me know if you have any additional problems.

from base16-emacs.

belak avatar belak commented on August 12, 2024

I spoke too soon. Still needs to be fixed for the 256 schemes.

from base16-emacs.

zagortenay333 avatar zagortenay333 commented on August 12, 2024

Still have this issue with emacs 24.5.1. Tried under gnome-terminal and urxvt.

Also, comments and the mode line in all themes seem to have the same weird pale violet color instead of the color corresponding to brightblack.

Before setting the background to black.
selection_002

Comment should be gray in the oceanicnext theme, but it's violet.
selection_003

On vim for comparison.
selection_005

from base16-emacs.

belak avatar belak commented on August 12, 2024

Do you have a screenshot of what you're seeing? And you're using base16-gnome-terminal, base16-shell, and base16-emacs together?

from base16-emacs.

zagortenay333 avatar zagortenay333 commented on August 12, 2024

I added screenshots to my comment. Yeah, I'm using base16-gnome-terminal, base16-shell and base16-emacs.

from base16-emacs.

zagortenay333 avatar zagortenay333 commented on August 12, 2024

I don't have any issues with vim.

from base16-emacs.

belak avatar belak commented on August 12, 2024

What's the value of $TERM?

I always seem to have issues reproducing issues with base16-shell interactions... so feel free to provide any information you think might help me reproduce this.

I think this may be an issue with how the setup handles 256 color terminals using base16-shell... right now we just let emacs do the color conversions (since passing in the actual colors will let emacs convert them to the 256 colorspace provided by the terminal), but that may not be the best approach because base16-shell mangles the 256 colorspace.

from base16-emacs.

zagortenay333 avatar zagortenay333 commented on August 12, 2024

TERM=xterm-256color

from base16-emacs.

zagortenay333 avatar zagortenay333 commented on August 12, 2024

I spent way too much time on this, and I have no clue why it isn't working. Can't think of anything more I could add. :/

from base16-emacs.

belak avatar belak commented on August 12, 2024

Out of pure curiosity, does emacs display properly if you don't source base16-shell? (Not a solution, just for debugging)

Similarly, does it display properly with TERM=xterm?

from base16-emacs.

zagortenay333 avatar zagortenay333 commented on August 12, 2024

Nope.

from base16-emacs.

belak avatar belak commented on August 12, 2024

I'm really not sure how to fix this... this displays correctly for me using emacs 25.1.1 both with and without base16-shell on gnome-terminal 3.22.1 with vte 0.46.1.

from base16-emacs.

belak avatar belak commented on August 12, 2024

If you're interested in fixing this, there's a chance that the base16-shell-colors variable (in base16-theme.el) could be changed to use the additional colorspace provided by base16-shell. I believe this would need to be customized before the themes are loaded, so it may be easiest to mess around with it in the file itself.

from base16-emacs.

belak avatar belak commented on August 12, 2024

In a few hours, there will be a new build on melpa... can you test that and let me know if it fixes this for you? I don't use terminal emacs, so I'm not 100% sure my hacked-together setup will match what everyone is trying to do.

from base16-emacs.

zagortenay333 avatar zagortenay333 commented on August 12, 2024

It's better. The annoying background is gone, and the color of the comments is correct now, but there are still some issues:
screenshot from 2017-03-27 16-44-28

The comment slashes (//) are yellow, the highlighted (current) line is green and the bar is yellow. :/

from base16-emacs.

belak avatar belak commented on August 12, 2024

@zagortenay333 Are you using base16-shell? Also (forgot to mention it) but you may need to put (setq base16-theme-use-shell-colors t) before loading the theme.

from base16-emacs.

zagortenay333 avatar zagortenay333 commented on August 12, 2024

Setting setq base16-theme-use-shell-colors t solved the problem. Thx!

I guess this issue can be closed now.

from base16-emacs.

zagortenay333 avatar zagortenay333 commented on August 12, 2024

Btw, this should really be mentioned in the README.

from base16-emacs.

mkaito avatar mkaito commented on August 12, 2024

Do you reckon this could be automated by checking whether emacs is running in a terminal?

from base16-emacs.

samir-memsql avatar samir-memsql commented on August 12, 2024

I'm seeing this issue as well. The behavior without setq base16-theme-use-shell-colros t is almost the same as for zagortenay333, but with it is still very wrong:

screenshot from 2017-03-28 11-59-54

I'm using most recent commit on base16-emacs/master and the base16-shell.
My .Xresources is configured directly from base16-xresources.

[2017-03-28 12:03:41] samir@host ~
$ echo $TERM
rxvt-unicode-256color
[2017-03-28 12:03:44] samir@host ~
$ emacs --version
GNU Emacs 24.5.1

from base16-emacs.

belak avatar belak commented on August 12, 2024

@samir-memsql Yes, you need base16-theme-use-shell-colors to use this with base16-shell for now.

@zagortenay333 I'll add it to the readme. Just wanted to make sure it worked first, since I use gui emacs and I'm sure there was something weird about my setup.

@mkaito Yes, this would be possible, but I'd prefer to default to the non-256 colorspace version, similar to what the vim theme does.

The base16-vim theme does something similar. I may change the variable name, but this general approach will probably be used.

from base16-emacs.

samir-memsql avatar samir-memsql commented on August 12, 2024

@belak Sorry for the confusion, my point was that the colors appear very wrong with or without base16-theme-use-shell-colors.

from base16-emacs.

belak avatar belak commented on August 12, 2024

What terminal/TERM value?

from base16-emacs.

samir-memsql avatar samir-memsql commented on August 12, 2024
[2017-03-28 13:01:09] samir@host ~
$ dpkg --list | grep rxvt
ii  rxvt-unicode-256color                         9.21-1build1                                  amd64        multi-lingual terminal emulator with Unicode support for X11
[2017-03-28 13:01:12] samir@host ~
$ echo $TERM
rxvt-unicode-256color

from base16-emacs.

belak avatar belak commented on August 12, 2024

If there's anyone still having trouble with this, please let me know. I plan on closing this as soon as I get a chance to update the documentation. Thanks to everyone for your feedback and help testing this!

from base16-emacs.

samimb avatar samimb commented on August 12, 2024

I'm still having issues with this.

#+BEGIN_SRC emacs-lisp
(setq base16-theme-use-shell-colors t)
#+END_SRC

#+begin_src emacs-lisp
(use-package base16-theme
:ensure t
:config
(load-theme 'base16-google-light t))
#+end_src

from base16-emacs.

samimb avatar samimb commented on August 12, 2024

That works great!

from base16-emacs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.