| 1 | //go:build js || plan9 || aix |
| 2 | // +build js plan9 aix |
| 3 | |
| 4 | package termenv |
| 5 | |
| 6 | import "io" |
| 7 | |
| 8 | // ColorProfile returns the supported color profile: |
| 9 | // ANSI256 |
| 10 | func (o Output) ColorProfile() Profile { |
| 11 | return ANSI256 |
| 12 | } |
| 13 | |
| 14 | func (o Output) foregroundColor() Color { |
| 15 | // default gray |
| 16 | return ANSIColor(7) |
| 17 | } |
| 18 | |
| 19 | func (o Output) backgroundColor() Color { |
| 20 | // default black |
| 21 | return ANSIColor(0) |
| 22 | } |
| 23 | |
| 24 | // EnableVirtualTerminalProcessing enables virtual terminal processing on |
| 25 | // Windows for w and returns a function that restores w to its previous state. |
| 26 | // On non-Windows platforms, or if w does not refer to a terminal, then it |
| 27 | // returns a non-nil no-op function and no error. |
| 28 | func EnableVirtualTerminalProcessing(w io.Writer) (func() error, error) { |
| 29 | return func() error { return nil }, nil |
| 30 | } |