Pistos / diakonos

Diakonos is a console text editor for the masses.
https://git.sr.ht/~pistos/diakonos
Other
137 stars 11 forks source link

colour.background 255 is not white #41

Closed X-Ryl669 closed 10 years ago

X-Ryl669 commented 10 years ago

It's very very light gray, but not white.

Pistos commented 10 years ago

Viewing the ansi colours text file that is in the repository, I don't see it as white there, either. I'm not sure this issue is specific to Diakonos. I'm also not sure how to get a full #FFFFFF white background in curses.

X-Ryl669 commented 10 years ago

I think you have 2 solutions.

Solution 1: Don't set the background at all.

curses.init_pair(1, curses.COLOR_WHITE, -1)

seems to work. (-1 for no background color) I have to test if this is already supported in the configuration file

Solution 2: Set the color you miss. This seems to work:

curses.init_color(192, 1000, 1000, 1000)
curses.init_pair(1, curses.COLOR_BLACK, 192)

This is currently not supported in the configuration file.

X-Ryl669 commented 10 years ago

Actually this commit solves the issue in my terminal (white is true white) : https://github.com/X-Ryl669/diakonos/commit/5ebbbe04e04190e70112f9006e0ab5243cc03549

Pistos commented 10 years ago

Closing this, as per our discussions in IRC. Diakonos now uses the terminal's default BG unless overridden by the configuration. This default BG can be black, white, or any colour, and transparency is now supported, too.