Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

color don't change #134

Open
Kobe972 opened this issue Oct 25, 2021 · 14 comments
Open

color don't change #134

Kobe972 opened this issue Oct 25, 2021 · 14 comments

Comments

@Kobe972
Copy link

Kobe972 commented Oct 25, 2021

It can't change the color. i.e., [...m has no effect. Win10 x64.

@adoxa
Copy link
Owner

adoxa commented Oct 25, 2021

You're going to need to be way more specific. Colour is tricky to demonstrate via copy/paste, so assuming nothing's working I'll demonstrate with move cursor right:

C:\Projects\ansicon>ver

Microsoft Windows [Version 10.0.19041.388]

C:\Projects\ansicon>ansicon --version
ANSICON (64-bit) version 1.89 (29 April, 2019).

C:\Projects\ansicon>ansicon -e ^[[4Cmove right
    move right

C:\Projects\ansicon>echo %ANSICON_VER%
189

C:\Projects\ansicon>echo ^[[4Cmove right
    move right

@acuna-public
Copy link

acuna-public commented Mar 11, 2022

I've the same problem too

C:\Windows\System32>ver

Microsoft Windows [Version 6.1.7601]

C:\Windows\System32>ansicon --version
ANSICON (64-bit) version 1.89 (29 April, 2019)

@adoxa
Copy link
Owner

adoxa commented Mar 12, 2022

Which gives me the same problem: lack of detail - all I can tell from that is you're using 64-bit Win7 and either ansicon is in the PATH or you've installed to system32 (bad idea). Does ansicon -e work? Did it install? Is it cmd that's not working, or some other program?

@acuna-public
Copy link

acuna-public commented Mar 12, 2022

Hello, ansicon -e show nothing and didn't help( And yes, it's only cmd till.

@adoxa
Copy link
Owner

adoxa commented Mar 13, 2022

Does ansicon -e ^[[4Ctest (where ^[ is the escape character, Ctrl+[) show     test (i.e. four spaces before test)?

@acuna-public
Copy link

No, it's not. But it's worked before I've bought another SSD and change its letter, I've even search somethig according with ansicon in regedit and found only its path in Path variable (which is correct). Will be glad it can be helpful.

@adoxa
Copy link
Owner

adoxa commented Mar 15, 2022

Do a log and send me the output. Here's mine.

C:\>ansicon -l5 -e ^[[4Ctest
    test

C:\>type %temp%\ansicon.log
ANSICON (64-bit) v1.89 log (5) started 2022-03-15 9:59:44

ansicon (11144): WriteConsoleW: 3 "\e[m"
ansicon (11144): WriteConsoleW: 8 "\e[4Ctest"
ansicon (11144): WriteConsoleW: 1 "\n"
ansicon (11144): Primary thread detached, exiting process
ansicon (11144): Terminating

@acuna-public
Copy link

acuna-public commented Mar 28, 2022

I'm so sorry, was busy this days. I forgot to run ansicon -i. But I don't remember that I did it before. But okay, seems I forgot about it, thanks for awesome project... Can I ask you, why does anybody use it on another versions of Windows, because as I know Windows 10 support colors out of the box.

@adoxa
Copy link
Owner

adoxa commented Mar 28, 2022

Windows 10 doesn't quite support colors out of the box - programs must still enable the terminal sequences.

@blackcrack
Copy link

blackcrack commented Mar 28, 2022

@acuna-public , a lil tip, make a bat/.cmd file for this task and
then do you need only kick on the script-file and all is done what's
with ansicon have to do...

@adoxa , Jason, could you onclude the WinNT 10/11 colorcode into ansicon, or it is not other ? (should i make a new issue?)
and the Hex-colors, it is give the possible for transparency in %, so these not only 6 digits, be now ?7? should be make more enhanced and supports that.. because, if taked code from a html5 page in hex-color

@adoxa
Copy link
Owner

adoxa commented Mar 28, 2022

I did actually make a start on passing through SGR sequences, but got sidetracked and never went back to it. Bit busy atm, but I'll get there...

@acuna-public
Copy link

acuna-public commented Apr 2, 2022

@adoxa yes, but is sequences only one way to get colors in cmd, or I've missed something?

@acuna-public
Copy link

acuna-public commented Apr 2, 2022

@blackcrack thank you, all is working without it, I've simply forgot to call ansicon -i.

@adoxa
Copy link
Owner

adoxa commented Apr 3, 2022

@adoxa yes, but is sequences only one way to get colors in cmd, or I've missed something?

I'm not sure what you're asking. If you want, e.g. cmd's echo command to have colors, then yes, sequences are the only way (well, apart from patching/hooking cmd itself and directly modifying the echo command to support colors in some way). If you want a batch file to have colored output then there are a variety of external tools to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants