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

Use node's built-in hasColors API for better color detection #85

Open
SuperchupuDev opened this issue Oct 9, 2024 · 0 comments
Open

Comments

@SuperchupuDev
Copy link

node has https://nodejs.org/api/tty.html#writestreamhascolorscount-env derived from chalk's supports-color that got added in node 10. not only would using it would make color detection more accurate, but it also would make the package more in line with node. it would also fix issues like #41.

yoctocolors seems to already use this API by doing tty?.WriteStream?.prototype?.hasColors?.() ?? false

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

1 participant