ugly border while background is white #10185

Closed
opened 2026-01-31 02:14:43 +00:00 by claunia · 6 comments
Owner

Originally created by @xmokay on GitHub (Aug 17, 2020).

after change background white, a black border present as follow.
2020-08-17_101331

remove the border as cmd.exe will looks better.
2020-08-17_102041

Originally created by @xmokay on GitHub (Aug 17, 2020). after change background white, a black border present as follow. ![2020-08-17_101331](https://user-images.githubusercontent.com/9464343/90351502-018b7900-e073-11ea-9ba0-c1d94782ca93.png) remove the border as cmd.exe will looks better. ![2020-08-17_102041](https://user-images.githubusercontent.com/9464343/90351665-79f23a00-e073-11ea-9ab3-21b1811dee50.png)
claunia added the Issue-FeatureResolution-By-DesignNeeds-TriageNeeds-Tag-Fix labels 2026-01-31 02:14:43 +00:00
Author
Owner

@DHowett commented on GitHub (Aug 17, 2020):

The color command can only change the background color of the terminal cells. Because there is padding and a hover scrollbar, the color behind them is not part of the terminal. The color command cannot change those colors, and it will never be able to. Sorry. 😄

@DHowett commented on GitHub (Aug 17, 2020): The `color` command can only change the background color of the _terminal cells_. Because there is padding and a hover scrollbar, the color behind them is not part of the terminal. The `color` command cannot change those colors, and it will never be able to. Sorry. :smile:
Author
Owner

@vefatica commented on GitHub (Sep 10, 2020):

If the padding is separate from the terminal cells, what about user-specified colors (active/inactive pane) for the padding itself? That would certainly make it easier to spot the active pane (given Windows 10's 2-pixel borders).

@vefatica commented on GitHub (Sep 10, 2020): If the padding is separate from the terminal cells, what about user-specified colors (active/inactive pane) for the padding itself? That would certainly make it easier to spot the active pane (given Windows 10's 2-pixel borders).
Author
Owner

@DHowett commented on GitHub (Sep 11, 2020):

The background is the user-specified padding color.

@DHowett commented on GitHub (Sep 11, 2020): The `background` is the user-specified padding color.
Author
Owner

@vefatica commented on GitHub (Sep 11, 2020):

I missed the reference to CMD's COLOR command. I imagine that's done with SetConsoleTextAttribute(). If so, after COLOR is issued shouldn't the control sequence \e[0m (et al.) respect the new default colors? I don't think it does.

@vefatica commented on GitHub (Sep 11, 2020): I missed the reference to CMD's COLOR command. I imagine that's done with SetConsoleTextAttribute(). If so, after COLOR is issued shouldn't the control sequence \e[0m (et al.) respect the new default colors? I don't think it does.
Author
Owner

@DHowett commented on GitHub (Sep 11, 2020):

It doesn’t because it can’t. There is a bit of an illusion here: there is no such thing as the default colors in a win32 console application. There’s only the active colors and the starting colors. Those are not a property accessible to or controllable by any API that a win32 console application can use. There is no way for the COLOR command, therefore, to change them. All it can do is repaint the entire buffer with a new attribute and pretend that no other application can change it.

In general, there is a mismatch between the VT and Win32 APIs in their capability and breadth. Mixing them isn’t highly recommended, and this would be an instance of mixing them.

@DHowett commented on GitHub (Sep 11, 2020): It doesn’t because it _can’t_. There is a bit of an illusion here: there is no such thing as the default colors in a win32 console application. There’s only the active colors and the _starting colors_. Those are not a property accessible to or controllable by any API that a win32 console application can use. There is no way for the `COLOR` command, therefore, to change them. All it can do is repaint the entire buffer with a new attribute and pretend that no other application can change it. In general, there is a mismatch between the VT and Win32 APIs in their capability and breadth. Mixing them isn’t highly recommended, and this _would_ be an instance of mixing them.
Author
Owner

@vefatica commented on GitHub (Sep 11, 2020):

It's no big deal to me. Before today I hadn't used the COLOR command since the days of MSDOS.

@vefatica commented on GitHub (Sep 11, 2020): It's no big deal to me. Before today I hadn't used the COLOR command since the days of MSDOS.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10185