Skip to content

Commit

Permalink
🐛 Fix colour detection
Browse files Browse the repository at this point in the history
Background detection was checking against the discard writer. This has
been fixed with restoring this to the stdout writer.
  • Loading branch information
mikelorant committed Feb 4, 2023
1 parent 22eb76d commit 08be699
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/ui/theme/theme.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package theme

import (
"io"
"os"

tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
Expand All @@ -28,7 +28,7 @@ func New(clr config.Colour) Theme {
lipgloss.SetHasDarkBackground(false)
t = lightTints()
default:
switch termenv.NewOutput(io.Discard).HasDarkBackground() {
switch termenv.NewOutput(os.Stdout).HasDarkBackground() {
case true:
t = darkTints()
case false:
Expand Down

0 comments on commit 08be699

Please sign in to comment.