C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Colored printing for std::print and std::println

From: Sebastian Wittmeier <wittmeier_at_[hidden]>
Date: Tue, 21 May 2024 02:12:48 +0200
Here a few links to existing libraries:   Termcolor C++: https://termcolor.readthedocs.io/ Termcolor-c: https://github.com/ararslan/termcolor-c rang: https://agauniyal.github.io/rang/ osmanip: https://github.com/JustWhit3/osmanip ncurses: https://invisible-island.net/ncurses/ vorbrodt: https://vorbrodt.blog/2019/03/21/ansi-escape-codes/ clicolors: http://bixense.com/clicolors/   -----Ursprüngliche Nachricht----- Von:Henrik Nyhammer via Std-Proposals <std-proposals_at_[hidden]> Gesendet:Di 21.05.2024 01:16 Betreff:Re: [std-proposals] Colored printing for std::print and std::println An:Tiago Freire <tmiguelf_at_[hidden]>; std-proposals_at_[hidden]; Jan Schultke <janschultke_at_[hidden]>; CC:Henrik Nyhammer <hsn95_at_[hidden]>; I have to admit that I'm not very familiar with the technicalities of terminals. If I understand you correctly then the way color is set on a terminal depends on the terminal itself and not the platform? I assumed that it was a platform specific detail, and as long as you knew that you were compiling for Linux for example, then you would know how the implementation should behave in order to work on Linux. But if it's left up to each individual terminal how color should be set then I agree that colored printing sounds difficult to implement in the standard library and might just be left to 3rd-party libraries. But if it's up to every individual terminal how it should be implemented, then how does C# manage to make it work? Sorry for asking two questions in one response.   

Received on 2024-05-21 00:12:51