Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for more OSC color formats (#7578)
* Correct the behaviour of parsing `rgb:R/G/B`. It should be interpreted as `RR/GG/BB` instead of `0R/0G/0B` * Add support for `rgb:RRR/GGG/BBB` and `rgb:RRRR/GGGG/BBBB`. The behaviour of 12 bit variants is to repeat the first digit at the end, e.g. `rgb:123/456/789` becomes `rgb:1231/4564/7897`. * Add support for `#` formats. We are following the rules of [XParseColor] by interpreting `#RGB` as `R000G000B000`. * Add support for XOrg app color names, which are supported by xterm, VTE and many other terminal emulators. * Multi-parameter OSC 4 is now supported. * The chaining of OSC 10-12 is not yet supported. But the parameter validation is relaxed by parsing the parameters as multi-params but only use the first one, which means `\e]10;rgb:R/G/B;` and `\e]10:rgb:R/G/B;invalid` will execute `OSC 10` with the first color correctly. This fixes some of the issues mentioned in #942 but not all of them. [XParseColor]: https://linux.die.net/man/3/xparsecolor Closes #3715
- Loading branch information