We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Git bash version:
$ git --version --build-options git version 2.20.1.windows.1 cpu: x86_64 built from commit: 7c9fbc07db0e2939b36095df45864b8cda19b64f sizeof-long: 4 sizeof-size_t: 8
Windows options: Windows 10 64-bit
$ cmd.exe /c ver Microsoft Windows [Version 10.0.17134.472]
Options:
Editor Option: VisualStudioCode Custom Editor Path: Path Option: Cmd SSH Option: OpenSSH CURL Option: OpenSSL CRLF Option: CRLFAlways Bash Terminal Option: MinTTY Performance Tweaks FSCache: Enabled Use Credential Manager: Enabled Enable Symlinks: Disabled
Python rgb colors work on Git bash, but not in node js. I figured out that CMD and PowerShell shows node js rgb colors.
Git Bash
$ node index.js $ py index.py
index.js
const rainbow = () => { for(let i = 0; i < 15; i++) { process.stdout.write('\033[48;2;255;' + (i * 16) + ';0m.\x1b[0m') } for(let i = 0; i < 15; i++) { process.stdout.write('\033[48;2;' + (255 - (i * 16)) + ';255;0m.\x1b[0m') } for(let i = 0; i < 15; i++) { process.stdout.write('\033[48;2;0;255;' + (i * 16) + 'm.\x1b[0m') } for(let i = 0; i < 15; i++) { process.stdout.write('\033[48;2;0;' + (255 - (i * 16)) + ';255m.\x1b[0m') } } rainbow()
index.py
import sys def rainbow(): for i in range(15): sys.stdout.write('\x1b[48;2;255;' + str(i * 16) + ';0m.\x1b[0m') for i in range(15): sys.stdout.write('\x1b[48;2;' + str(255 - (i * 16)) + ';255;0m.\x1b[0m') for i in range(15): sys.stdout.write('\x1b[48;2;0;255;' + str(i * 16) + 'm.\x1b[0m') for i in range(15): sys.stdout.write('\x1b[48;2;0;' + str(255 - (i * 16)) + ';255m.\x1b[0m') sys.stdout.write('\n') rainbow()
Same results when running both commands.
Node js command shows 5 colors, meanwhile, Python command shows rainbow.
The text was updated successfully, but these errors were encountered:
node index.js
Can you try to run it through node.exe, i.e. node.exe index.js?
node.exe
node.exe index.js
Sorry, something went wrong.
Apparently not...
No branches or pull requests
Setup
Git bash version:
Windows options: Windows 10 64-bit
Options:
Python rgb colors work on Git bash, but not in node js. I figured out that CMD and PowerShell shows node js rgb colors.
Details
Git Bash
index.js
index.py
Same results when running both commands.
Node js command shows 5 colors, meanwhile, Python command shows rainbow.
The text was updated successfully, but these errors were encountered: