Search code examples
c#consoleansi-escape

C# - Make text blinking in console using ANSI codes


My goal is to make my text blinking in the console. I know how to do that using a timer (Link), but I want to do this using ANSI codes not like Here. I am aware of the fact, that ANSI codes work in console. Because colors, bold and underline work fine. Blinking text should look like that: "Normal \e[5mBlink", but it is not working. I know projects like SadConsole that provide this option, but I do not know how it works. So, could anyone help me with this problem?

PS. Here is the reference that I know about ANSI: Link


Solution

  • In the msdn "Console Virtual Terminal Sequences" reference that contains the supported ansi sequences there is no blinking effect. Sorry :-)

    To be precise, under Text Formatting:

    0 Default Returns all attributes to the default state prior to modification

    1 Bold/Bright Applies brightness/intensity flag to foreground color

    4 Underline Adds underline

    24 No underline Removes underline

    7 Negative Swaps foreground and background colors

    But there is no 5, that is Blink.