oh-my-zsh themes don't show properly (background stays white) [closed] - osx-lion

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I am trying to figure out why my oh-my-zsh themes don't work properly. The colors show up properly, but background stays white (with black text). below is my /.zshrc file and current path variable:
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
export ZSH_THEME="robbyrussell"
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
# Comment this out to disable weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# Uncomment following line if you want to disable colors in ls
#DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment following line if you want red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git rails ruby brew)
source $ZSH/oh-my-zsh.sh
# Customize to your needs...
autoload -U colors
colors
here is $PATH :
➜ ~ echo $PATH
/Users/natascha/.rbenv/shims:/Users/natascha/.rbenv/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/texbin
I am on Mac OS X 10.7.5 and installed oh-my-zsh months ago.. I have made a post in the git issue, https://github.com/robbyrussell/oh-my-zsh/issues/929#issuecomment-11652602, it seems to still have not been resolved? My plugins work ( i.e. i can type rails c for "rails console").
Thank you for any help.

Short answer: no, zsh can't help you here. You need to change the terminal emulator color settings, not the zsh settings.
This is what you're currently seeing:
and this is what you're expecting to see:
This is the line that produces this prompt:
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c
%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
The Z-Shell does have some foreground, background settings you can use in the PROMPT - that's what the fg_bold means (foreground to bold). You can replace this with bg_ for background, and omit the bold to use a non-bold font.
For example, we can set the background of the PROMPT to green by adding %{bg[green]%}:
PROMPT='%{$bg[green]%}%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c
%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
This results in:
However, this more than likely is not what you want. Note several things:
The bg[green] does not extend to the edge of the terminal window - the PROMPT settings only work where the line is drawn.
The background color is reset to 'default' at the end of the prompt - that's done by %{$reset_color%} (necessary to change the foreground color to default). Getting a consistant, whole-line background color gets messy quickly.
How the colors work
Roughly (I could be wrong in details, but the overall gist is correct, I believe): the shell you use sends a color code to the terminal emulator. The terminal emulator is responsible for interpreting that color code, and displaying it on the screen. This means there are two settings you can fiddle with:
The shell color settings. That's what you're doing in your zshrc. Primiarily, this allows for consistency - you can say "Display this bit of the prompt in the same $COLOR as that bit of the prompt". This doesn't mean the user will see the prompt in $COLOR; $COLOR is a label, not much more.
The displayed color settings. That's where you set the preferred font, background, text color, etc. It's where you can say "display everything the shell says is $COLOR_1 as red, $COLOR_2 as green", etc.
There are 16 colors you can use in an ANSI terminal, which may-or-may-not be displayed correctly. Check this table for some common terminal colors, and note the differences displayed between them!
Fixing your colors
If you're using Terminal.app (on OS X, I'd recommend iTerm2), open the preferences for Terminal (command+,), and select "Settings". There's a bunch of "profiles" you can choose from - to emulate the robbyrussell screenshot above, you'd want to fiddle with the colors a little. "Homebrew" is pretty close, but has different "text" colors (green instead of white).
[Here is the robbyrussell zsh theme with the Homebrew Terminal.app profile:
If you'd like a good, pre-set, easy-on-the-eyes color scheme, check out Solarized.

Like said in the answer above it is "You need to change the terminal emulator color settings:"
I don't find any reason changing terminal app, the easiest way is only changing the theme to one of the available themes in the link below, you can find one that suits to oh-my-zsh themes.
osx-terminal-themes

For me the fix was found in a preferences panel where I had to deselect which was overriding the theme...
I'm using gnome-terminal on an instance of Red Hat.
Found Under:
Terminal -> Preferences -> Unnamed -> Colors -> Use colors from system theme
(took me much too long to realize that...)

I was surprised this didn't work out of the box as well. However, I was able to get pretty close with just a few minor changes to the Basic theme:
Change the background to a dark color
Change text to a light color
Change selection/opacity to get a good highlight
Also, when selecting a color, use the eye dropper to get the exact color you're looking for:
With the eyedropper and a picture of his theme, you should be able to get pretty close.

Related

Netbeans 11 - Change Color of current line in xdebug

I try to change the color of the current line in the debugger,
since the contrast is very bad, you can barely read it.
I searched all options under Fonts & Colors but I could not find it.
It even persists after applying a new theme.
To change the background color of the current line within the debugger:
Tools > Options > Fonts & Colors
Click the Annotations tab.
From the Category list select Current Program Counter.
Select the new Background color, which is yellow in the example below, and click Apply.
In my case I tested this by debugging a servlet. Simply redeploying the application, or restarting the application server, did not trigger the background color change. Instead I needed to close and reopen the edit window of the source code that was being debugged for it to become effective. You could just restart NetBeans instead, but that seems like overkill.

VS Code terminal colors are screwy

I'm using the default theme. The terminal's colors are impossible to read, make no sense, and are inconsistent. I've tried switching themes but they're terrible in all the themes.
Here's what it looks like in the default. Are you able to read my yellow input against the gray background? And why isn't there a black background everywhere?
I realize there are settings that can manually set the fore/background colors. But I'm thinking something is broken for me because of how screwy the terminal behaves.
For example, here's what I see when I first start the terminal, type a bunch of stuff, backspace to delete half of it, resize the terminal pane, then delete some more. Notice how some of the deleted spaces have yellow and some have gray. Also notice how the area where the CWD would be shown is all black.
Here are the contents of my settings.json file:
{
"window.zoomLevel": 0,
"git.enableSmartCommit": true,
"workbench.startupEditor": "newUntitledFile"
}
What needs fixing, and how?
Edit:
Just to satisfy your curiosity, I added this to my settings.json file:
"workbench.colorCustomizations": {
"terminal.foreground": "#ffffff",
"terminal.background": "#000000"
}
No joy:
There might be something wrong in your console settings, you might want to remove the content of HKCU\Console in your registry. Save it before, obviously, but there shouldn't be any side effect: it'll just be recreated with the default settings.
Okay, so here's a list of all possible settings that you could tweak in your terminal window colorscheme: (source)
"workbench.colorCustomizations": {
"terminal.background":"#1D2021",
"terminal.foreground":"#A89984",
"terminalCursor.background":"#A89984",
"terminalCursor.foreground":"#A89984",
"terminal.ansiBlack":"#1D2021",
"terminal.ansiBlue":"#0D6678",
"terminal.ansiBrightBlack":"#665C54",
"terminal.ansiBrightBlue":"#0D6678",
"terminal.ansiBrightCyan":"#8BA59B",
"terminal.ansiBrightGreen":"#95C085",
"terminal.ansiBrightMagenta":"#8F4673",
"terminal.ansiBrightRed":"#FB543F",
"terminal.ansiBrightWhite":"#FDF4C1",
"terminal.ansiBrightYellow":"#FAC03B",
"terminal.ansiCyan":"#8BA59B",
"terminal.ansiGreen":"#95C085",
"terminal.ansiMagenta":"#8F4673",
"terminal.ansiRed":"#FB543F",
"terminal.ansiWhite":"#A89984",
"terminal.ansiYellow":"#FAC03B"
}
Now for me, the colors of folder names was too bright over an even brighter background color that highlighted them and I couldn't read squat (that's because of my VSCode theme called NightOwl -- :P Sarah) so I thought (wrongly) to change terminal.background and terminal.foreground properties but that refer to the entire rendered window of the terminal.
Because these properties are actually named after Ansi Escape Codes, what I was actually looking for were these properties: terminal.ansiBlue for folder name text color and terminal.ansiGreen for folder name background highlight color.
As soon as I tweaked those, my terminal was good to go.
The way to do it is to just set all these settings and start removing or changing them to see which is which for your preference. K Thx Bye
Also beware that terminal.ansiGreen is used by git diff as a color to show additions.
On March 8th 2022 the default value for the integrated terminal "minimum contrast ratio" was updated from 1 (no effect) to 4.5 (minimal effect). Depending on your color settings and what is being displayed, this can cause your integrated terminal foreground colors to be wrong.
To disable this feature, override the default in your own settings.json file:
"terminal.integrated.minimumContrastRatio": 1
There are two solutions. Xavier's solution works, and mklement0's comment was also correct.
Solution #1
Do what Xavier said (and upvote his answer).
But, if you don't want to mess up registry settings (or if, like me, you have lots of registry settings nestled under the HKCU\Console root), then...
Solution #2
Get Windows 10 build number 18309 (or newer)
Join the Windows Insider Program
Make sure you're on a "ring" that includes a new-enough build. For me at this moment that meant joining the "fast" ring
Wait forever for updates to finish installing
Add "terminal.integrated.windowsEnableConpty": true to your settings.json
Restart terminals
Upvote mklement0's comment
...
Profit!
I am new to VS Code (and I'm trying to better my PowerShell skills) and have/had this same problem. Deleting all the Reg keys cited above related to colors seemed to fix it, but I believe the root problem is that VS Code seems to be trying to honor the color scheme set up outside the VS Code Terminal itself, from the shell. Really annoying and I'm not sure how to separate the two.
I had setup a blue background/yellow font scheme in PS prior to installing VS Code. That was the same color scheme the terminal in VS Code was displaying directly around the text.

Emacs on Windows 7: How to get color theme »solarized-light« working?

I'm using Emacs 24 on Windows 7. I installed the solarized theme, see here: https://github.com/sellout/emacs-color-theme-solarized
It is easy to switch to the color-theme, e.g. by doing M-x load-theme and then pick solarized-light.
But especially the colors of solarized-light are nearly unreadable. The colors are not even close to the colors of the pictures. I guess there is something wrong with a thing called »color palette«, see here: console2 colors solarized
Any ideas?
Edit: I made a screenshot of Emacs which shows the pretty low contrast.
So, I installed it now, and I see the lack of contrast. But the difference seems to be cause by the difference in font rendering across operating systems.
The screenshots on the github page have most likely been done on Mac OS, which renders the fonts the thickest. The theme looks reasonable on Linux with the default font, although, depending on the settings, it renders the text a bit or more thinner. And Windows renders text with the smallest amount of "ink", so to speak. While it's considered sharper my some users, it also makes things worse when a theme uses low-contrast colors, such as the light version of Solarized.
Another thing to note is that the screenshots are done in Vim, which has a different syntax highlighting mechanism from Emacs, so the colors on keywords, etc, are bound to be different.
But I took two screenshots, on Ubuntu and Windows, opened them in Gimp, zoomed in, used the color picker, and the value of the blue color was approximately the same as on the reference screenshot: 2690db.
In my view, i don't feel the theme work improperly.
The following is my screenshot, os x, Emacs 24.3
Have you tried to change another font or theme (if that is not your only love)

Eclipse - Using different colors for printing

I am using the Obsidian theme with the Eclipse Color Theme plugin.
When coding I am very happy with how everything looks:
However, printed code is rather hard to read:
Is there any way to make Eclipse print with different colors than it displays?
2 1/2 yrs later, for others besides OP :) Right click your file in Project Explorer and choose 'Open with'; choose Text editor instead of Java/etc editor and print from there. Or alternatively, System Editor (if yours lets you check/uncheck 'print syntax highlighting'). Unless you can force your printer to use black & white instead of grayscale. I couldn't.
There is a quick and dirty answer... change theme prior to printing.

Dark color scheme for Eclipse [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Is Eclipse at all theme-able? I would like to install a dark color scheme for it, since I much prefer white text on dark background than the other way around.
As posted to a few related questions already, I'm working on a plugin for easy, cross-editor color theme management:
http://marketplace.eclipse.org/content/eclipse-color-theme
It is still work in progress, but already supports many editors and a few dark color themes.
I've created my own dark color scheme (based on Oblivion from gedit), which I think is very nice to work with.
Preview & details at: http://www.rogerdudler.com/?p=362
We're happy to announce the beta of eclipsecolorthemes.org, a new website to download, create and maintain Eclipse color themes / schemes. The theme editor allows you to copy an existing theme and edit the colors with a live preview of your changes on specific editors. The downloadable themes support a lot of editors (PHP, Java, SQL, Ant, text, HTML, CSS, and more to follow)
There's a growing list of themes already available on the site:
Zenburn
Oblivion
Inkpot
Vibrant Ink
You can read more about the launch here.
Here's a guy that posted his Eclipse preferences for changing the colors like a theme:
http://blog.codefront.net/2006/09/28/vibrant-ink-textmate-theme-for-eclipse/
And here's more about how to set the colors in the Ganymede Eclipse version (v. 3.4, mid 2008):
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.platform.doc.user/concepts/accessibility/fontsandcolors.htm
For Linux users, assuming you run a compositing window manager (Compiz), you can just turn the window negative. I use Eclipse like this all the time, the normal (whitie) looks is blowing my eyes off.
These are the pleasing colors for my eyes during coding. Jazz music not included in theme.
Eclipse Color Themes Plugin file: LukinaJama3.xml on depositfiles
This is the best place for Eclipse color themes:
http://www.eclipsecolorthemes.org/
I have to say, this is one area where Eclipse is really weak. Specifically, the import/export of preferences applies to ALL preferences. There is no way to import say just the fonts/color preferences (like you can with Visual Studio) without mucking up my key binding preferences.
Also, I have tried several of these preference files referenced above, and they completely break my Eclipse install.
I've created several color themes, and a script to extract a new one from someone's color preferences. I'm currently using one I still have yet to post on the site, but I should eventually get to it.
http://eclipsecolorthemes.jottit.com
Easiest way: change the Windows Display Properties main window background color. I went to Appearance tab, changed to Silver scheme, clicked Advanced, clicked on "Active Window" and changed Color 1 to a light gray. All Eclipse views softened.
Since Luna (4.4) there seems to be a full Dark them in
Window -> Preferences -> General -> Appearance -> Theme -> Dark
For the quick hack, on Linux running GNOME with a Windows keyboard, Windows-Key-M will inverse-color all windows, and Windows-Key-N will inverse color a single window. It's an awesome feature, in my book.
As I replied to "Is there a simple, consistent way to change the color scheme of Eclipse editors?":
I've been looking for this too and
after a bit of research found a
workable solution. This is based on
the FDT editor for Eclipse, but I'm
sure you could apply the same logic to
other editors.
My blog post: Howto create a
color-scheme for FDT
Hope this helps!
The best solution I've found is to leave Eclipse in normal bright mode, and use an OS level screen inverter.
On OS X you can do Command + Option + Ctrl + 8, inverts the whole screen.
On Linux with Compiz, it's even better, you can do Windows + N to darken windows selectively (or Windows + M to do the whole screen).
On Windows, the only decent solution I've found is powerstrip, but it's only free for one year... then it's like $30 or something...
Then you can invert the screen, adjust the syntax-level colours to your liking, and you're off to the races, with cool shades on.
If you use Aptana then you can download a dark color theme! I have been looking for one recently and found the Aptana one. Thought others might be interested!
Check out: http://www.nightlion.net/themes/2009/aptana-dark-color-theme/
Checkout this color scheme I created for Eclipse PDT. It is based on the Vim Zenburn color scheme developed by slinky
Here's a rev 0.0.1 of an attempt at a dark background colour scheme for Eclipse (and a screenshot). Any feedback at all? (this is a big departure from what I normally use for Vim.
Some people posted options for Linux and Mac, and the Windows (free) equivalent is, if you can deal with it globally:
Set Windows desktop appearance theme window background color. You can keep current/desired theme, just modify the background color of windows. By default, it is set to white. I change it to a shade of grey. I tried dark grey and black before, but then you have to change text font colors globally, and all that's painful.
But a simple shade of grey as background does the trick globally, works with any color text font as long as the shade of grey is not too dark.
It's not the best solution for all editors/IDEs, as I prefer black, but it's the next best free & global workaround on Windows.
I have finally found exactly what I have been looking for, i.e. a dark theme for PyDev (although I still feel like Eclipse is missing out on this).
This is another dark Eclipse theme: http://blog.prabir.me/post/Dark-Eclipse-Theme.aspx.
I have the Visual Studio equivalent of the theme.
I played with customizing the colors. I went with the yellow text/blue background I've liked from Turbo Pascal. The problem I ran into was it let you set the colors of the editors but then the other views like Package Explorer or Navigator stayed with the default black-on-white colors. I'm sure you could do it programatically but there are waaaay to many settings for my patience.
In response to this comment I made a filter for Color Filter plugin for Compiz.
Here's what I got:
Howto:
Go to /usr/share/compiz/filters/
Create new file "negative-low-contrast" (as
root)
Insert the attached code into it.
Go to
System->Preferences->CompizConfig
...
Enter Color Filter Plugin
Enable
it and add newly created filter to
the list Profeet!!
Filter code:
!!ARBfp1.0
TEMP temp, neg;
# Dunno what's this... but every other filter starts with this :) ;
TEX temp, fragment.texcoord[0], texture[0], RECT;
# Applying negative filter ;
RCP neg.a, temp.a;
MAD temp.rgb, -neg.a, temp, 1.0;
MUL temp.rgb, temp.a, temp;
MUL temp, fragment.color, temp;
# Lowering contrast and shifting brightness ;
MUL temp.rgb, temp, 0.8;
ADD temp.rgb, temp, 0.25;
MOV result.color, temp;
END
You also can play with the filter. May be you will get something more facinating :) Feel free to share!