Comments (14)
If I were using this library though, and would work on windows (slim chance 😉), I would be surprised that Chalk.blue
does not correspond to the 'standard' blue styling. Especially considering 1200+ modules depend on Chalk, some of which are libraries themselves, an unpredictable api is a bad thing. Chalk.blue
transparently becoming Chalk.blue.bold
is not something you'd expect looking at the api.
On the other hand, if we add a note in the readme.md
, then I guess you're right it couldn't do too much harm. It's not a problem I've experienced, but if you think it makes unhappy windows users slightly happier, go for it 👍
from chalk.
meaning when you do chalk.blue
the result would actually be chalk.bold.blue
? It's a good thought since windows terminal visually sucks, but nah, I'd leave it as-is. It's easy enough for implementors to use bold if they want. thanks for asking!
from chalk.
@jonschlinkert The point is that implementors shouldn't have to care whether it's going to be used on Windows. Forcing them to care is a leaky abstraction. It's actually leaks in Windows, but can't really fix that mess. I'm just tired of being trolled on so many repos for using blue
.
from chalk.
I really wouldn't start making platform-specific exceptions. Can't windows users change their default color palette if they're unhappy with the provided blue
?
from chalk.
I really wouldn't start making platform-specific exceptions.
Why? We already do it for so much: https://github.com/search?l=javascript&nwo=sindresorhus%2Flog-symbols&q=process.platform+%3D%3D%3D+%27win32%27&ref=cmdform&search_target=global&type=Code
Can't windows users change their default color palette if their unhappy with the provided blue?
I tried that argument. Nobody does...
I don't see the downside though. The result is that anyone using chalk and blue
gets less Windows trolling.
from chalk.
Can't windows users change their default color palette if their unhappy with the provided blue?
I tried that argument. Nobody does...
It is not actually possible on most cmd.exe and powershell
from chalk.
@SBoudrias fair enough. That's a valid argument to the make the default blue
the prettiest blue that windows does offer.
Is there actually a remotely sane technical reason these terminal emulators don't allow for a variable palette?
from chalk.
I would favor opting for a bolded blue or more clear tone of blue for Windows users given the limitations outlined above.
from chalk.
@addyosmani changing the tone of blue is not an option, the available colors are the 16 listed here.
The fact that this page talks about 8 base colors and 8 dark tints is telling though. So I guess defaulting blue to bold/bright blue is indeed a good choice @sindresorhus
from chalk.
after reading others' comments, I think defaulting to bold blue is probably good choice, as long as it doesn't alter the visual balance in my collection of windows ansii rainbow art ;P
from chalk.
@sindresorhus any progress on this?
from chalk.
@jbnicolai No, I haven't had a chance to do this yet. Feel free. Otherwise I'll probably get to it next week ;)
from chalk.
My 2¢: The readme says:
Chalk does not support support anything other than the base eight colors, which guarantees it will work on all terminals and systems.
So it depends on what you mean by “work”. Does a barely visible blue “work”?
from chalk.
@lydell cmd.exe
is far from an actual terminal/system, but that's irrelevant as we already decided to fix this.
Does a barely visible blue “work”?
Apparently Microsoft thought so.
from chalk.
Related Issues (20)
- Add more colors HOT 2
- Chalk is not working in Jenkins multibranch pipeline HOT 1
- Does chalk.js support squiggly lines? HOT 1
- Cannot find module 'chalk'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? HOT 2
- Can't show color in vscode integrated terminal HOT 1
- chalk not suppported?? HOT 1
- Tried to use with TS (NestJS Project) HOT 6
- is there r any way to mix background colors like gradient-string? HOT 1
- Error [ERR_REQUIRE_ESM]: require() of ES Module HOT 6
- chalk 5.x fails with typescript HOT 3
- Is it possible to apply a style conditionally? HOT 5
- ReferenceError: navigator is not defined HOT 1
- Remove README.md from bundle HOT 2
- v4 property override error
- is support require('chalk')? HOT 3
- Chalk italic modifier is not applied in Windows Git Bash terminal. HOT 1
- $FORCE_COLOR works only as either level 0 or 3 HOT 1
- New Windows fluent emoji font - color is wrong HOT 1
- Unable to resolve module #ansi-styles HOT 2
- 【suggestion】support commonjs version HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chalk.