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

feat: add Deno.colorDepth #28122

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

feat: add Deno.colorDepth #28122

wants to merge 1 commit into from

Conversation

marvinhagemeister
Copy link
Contributor

Adds Deno.colorDepth to get the color depth of the tty. It detects the following color depths:

  • 1bit: black & white
  • 4bit: 16 colors
  • 8bit: 256 colors
  • 24bit: 16,777,216 colors (often also referred to as "true color")

This mirrors Node's tty.getColorDepth values which we already support.

Not sure if we want to add it or not, but I figured having a PR up might be nice. Idea came from #27866 where environment var permissions are mostly from color libraries trying to determine the currently supported color depth.

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

Successfully merging this pull request may close these issues.

1 participant