xtermjs / xterm.js

A terminal for the web
https://xtermjs.org/
MIT License
16.99k stars 1.59k forks source link

Support for wider color spaces? #5045

Closed YousufSSyed closed 2 months ago

YousufSSyed commented 2 months ago

Xterm seems to only support srgb. I don't know about canvas elements but CSS has the color() function to define colors in specific color spaces.

jerch commented 2 months ago

A terminal can only reliably do RGB, CMY, CMYK or indexed colors from the SGR function spec. We have implemented RGB and indexed colors, but not the others.

While it would be possible to create color-space translations from those other modes of color() maybe to indexed or close RGB matches, I dont think there is any real value to have that in xterm.js itself. You can always do that in your code as well.