[semidet]ansi_get_color(+Which,
-RGB)foreground and background. This predicate
sends a request to the console (user_output) and reads the
reply. This assumes an xterm compatible terminal.
| RGB | is a term rgb(Red,Green,Blue).
The color components are floats in the range 0.0..1.0. They are sRGB
encoded, as that is what the terminal reports; linearise them before
doing colour arithmetic that assumes light intensities. |
- Compatibility
- Up to version 10.1.13 the components were integers in the range 0..65535. The terminal reports one to four hexadecimal digits per component, so that range suggested a precision the reply does not have, and it clashed with the rgb/3 term of win_window_color/2, whose components are in the range 0..255.