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

Colors on OS X (10.8) don't show up properly. #880

Closed
InfernoZeus opened this issue May 6, 2013 · 8 comments

Comments

Projects
None yet
6 participants
@InfernoZeus
Copy link
Contributor

commented May 6, 2013

Haven't compared to it running on Linux/Windows yet, but I'm certain that some colors aren't showing up properly and are falling back to others. For instance, dark grey becomes black, which makes it impossible to see certain mobs.

@ethankaminski

This comment has been minimized.

Copy link
Contributor

commented May 7, 2013

It may be due to how curses handles colors - I've heard that it conflates highlighted and bold. A Mac-using friend of mine briefly tried out Cataclysm, and he said that it seems we're requesting bold/highlighted text and expecting it to be highlighted, which works on Linux terminals, but not the default OS X terminal.

I also know that in my terminal, I had to set the "no bright backgrounds" option to "true". That's probably worth trying, just in case.

@InfernoZeus

This comment has been minimized.

Copy link
Contributor Author

commented May 7, 2013

The fix for this on OS X is in Terminal's "Preferences -> Settings -> Text", enable "Use bright colors for bold text".
I don't know if there's a way for Ncurses/Cataclysm to detect whether bold text is being shown as bright, but for now that's a good enough fix. I'll add something in the README.

@kevingranade

This comment has been minimized.

Copy link
Member

commented May 13, 2013

At least one color, i_dkgray if I remember correctly appears as black on linux as well.

@InfernoZeus

This comment has been minimized.

Copy link
Contributor Author

commented May 13, 2013

Yep, that's the same problem. At least on OS X, the fix in my previous post works.

@InfernoZeus

This comment has been minimized.

Copy link
Contributor Author

commented May 13, 2013

Just thought I'd include the contents of a response I got from the Ncurses dev about a similar color issue on OS X. I didn't really understand most of it!

On Tue, May 07, 2013 at 11:12:47PM +0100, Ben Fox-Moore wrote:

I've noticed some strange behaviour with Ncurses 5.7 on my OS X 10.8
machine. If I try to create a custom color with (r,g,b) values
(681,681,681), instead of showing up pretty much identical to COLOR_WHITE,
it becomes a shade of red. (The same also applies to values above 681,
always displaying the same shade of red.)

Here's some example code which has the problem:
https://gist.github.com/InfernoZeus/5536379
and here's the result in OS X: http://i.imgur.com/GgaBP1p.png

First off, am I doing something wrong in my code? If not, is this a bug in
OS X?

I think the problem is OS X.

They've set $TERM to xterm-256color, which raises expectations about the
behavior of the terminal emulator. The entries which we've recommended
are the "nsterm" ones (including nsterm-256color). The xterm-256color
entry does define initc (which your program assumes, more or less), but
the nsterm ones do not.

Checking now to see if that was overlooked (and perhaps scaled
inconsistently) using the ncurses test-program menu 'd', I don't see any
sign that the initc capability is honored (so the recommended entries
still are nsterm, etc). Since you're not able to set the palette, then
your program will give odd results.
`

@SiGhTfOrbACQ

This comment has been minimized.

Copy link

commented Sep 28, 2013

I do not have the above problem - here is my terminal.app configuration:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>BackgroundColor</key>
    <data>
    YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
    AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NGMCAw
    IDAAEAGAAtIQERITWiRjbGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhOU09iamVj
    dF8QD05TS2V5ZWRBcmNoaXZlctEXGFRyb290gAEIERojLTI3O0FITltiaWttcn2GjpGa
    rK+0AAAAAAAAAQEAAAAAAAAAGQAAAAAAAAAAAAAAAAAAALY=
    </data>
    <key>BlinkText</key>
    <false/>
    <key>Font</key>
    <data>
    YnBsaXN0MDDUAQIDBAUGGBlYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
    AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QVk5TU2l6ZVhOU2ZGbGFnc1ZOU05hbWVWJGNs
    YXNzI0AqAAAAAAAAEBCAAoADXxAPbW9ub09uZS1SZWd1bGFy0hMUFRZaJGNsYXNzbmFt
    ZVgkY2xhc3Nlc1ZOU0ZvbnSiFRdYTlNPYmplY3RfEA9OU0tleWVkQXJjaGl2ZXLRGhtU
    cm9vdIABCBEaIy0yNzxCS1JbYmlydHZ4io+ao6qttsjL0AAAAAAAAAEBAAAAAAAAABwA
    AAAAAAAAAAAAAAAAAADS
    </data>
    <key>FontAntialias</key>
    <true/>
    <key>FontWidthSpacing</key>
    <real>1.004032258064516</real>
    <key>Linewrap</key>
    <true/>
    <key>ProfileCurrentVersion</key>
    <real>2.02</real>
    <key>TerminalType</key>
    <string>nsterm</string>
    <key>TextBoldColor</key>
    <data>
    YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
    AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NGMSAx
    IDEAEAGAAtIQERITWiRjbGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhOU09iamVj
    dF8QD05TS2V5ZWRBcmNoaXZlctEXGFRyb290gAEIERojLTI3O0FITltiaWttcn2GjpGa
    rK+0AAAAAAAAAQEAAAAAAAAAGQAAAAAAAAAAAAAAAAAAALY=
    </data>
    <key>TextColor</key>
    <data>
    YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
    AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NMMC45
    IDAuOSAwLjkAEAKAAtIQERITWiRjbGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhO
    U09iamVjdF8QD05TS2V5ZWRBcmNoaXZlctEXGFRyb290gAEIERojLTI3O0FITltib3Fz
    eIOMlJegsrW6AAAAAAAAAQEAAAAAAAAAGQAAAAAAAAAAAAAAAAAAALw=
    </data>
    <key>UseBrightBold</key>
    <true/>
    <key>name</key>
    <string>Games</string>
    <key>type</key>
    <string>Window Settings</string>
    <key>useOptionAsMetaKey</key>
    <true/>
</dict>
</plist>
@kevingranade

This comment has been minimized.

Copy link
Member

commented Jan 6, 2014

So is this our issue or just a configuration problem on OSX?

@Izicata

This comment has been minimized.

Copy link
Contributor

commented Jan 6, 2014

This is a configuration problem on OSX. The only thing that needs to be done is to put something in the README.txt file about turning on the "Use Bright Colours for Bold Text" option.

I might as well do that right now, actually: #5433

@i2amroy i2amroy closed this Apr 10, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.