Giter Club home page Giter Club logo

Comments (14)

jbnicolai avatar jbnicolai commented on May 14, 2024 1

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.

jonschlinkert avatar jonschlinkert commented on May 14, 2024

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.

sindresorhus avatar sindresorhus commented on May 14, 2024

@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.

jbnicolai avatar jbnicolai commented on May 14, 2024

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.

sindresorhus avatar sindresorhus commented on May 14, 2024

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.

SBoudrias avatar SBoudrias commented on May 14, 2024

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.

jbnicolai avatar jbnicolai commented on May 14, 2024

@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?

tumblr_m1q33qualx1qlqt75o1_r1_500

from chalk.

addyosmani avatar addyosmani commented on May 14, 2024

I would favor opting for a bolded blue or more clear tone of blue for Windows users given the limitations outlined above.

from chalk.

jbnicolai avatar jbnicolai commented on May 14, 2024

@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.

jonschlinkert avatar jonschlinkert commented on May 14, 2024

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.

jbnicolai avatar jbnicolai commented on May 14, 2024

@sindresorhus any progress on this?

from chalk.

sindresorhus avatar sindresorhus commented on May 14, 2024

@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.

lydell avatar lydell commented on May 14, 2024

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.

sindresorhus avatar sindresorhus commented on May 14, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.