In Windows 10 build 16257 (released last year) and later, ANSI color and escape sequences for the built-in cmd.exe console (“conhost”) are subject to the following registry key:
[HKEY_CURRENT_USER\Console]
"VirtualTerminalLevel"=dword:00000001
See MSDN blogs for more information. There’s also some official MSDN docs and a bunch of articles on StackOverflow, such as here and here. There’s also some critical information on this subject in this github comment.
This new capability means that the following lines of code in youtube-dl are overly-restrictive:
https://github.com/rg3/youtube-dl/blob/f9f10268c18...
https://github.com/rg3/youtube-dl/blob/f9f10268c18...
https://github.com/rg3/youtube-dl/blob/f9f10268c18...
On Windows 10, the value of compat_os_name is “nt”. Because the lines listed above subsume all three cases where youtube-dl references the --no-color command-line option, the end result is that the --no-color option always asserted on Windows (that is, regardless of not specifying --no-color).
ytdl-no-color
Relaxing the three conjunctions shown above, by removing the and compat_os_name != 'nt' term from each, allows for ANSI color on Windows 10 (assuming the system-wide default is ‘enabled’ as specified by the registry key mentioned above).