Skip to content

Commit 6cdf29b

Browse files
committed
[FIX] terminal adaptive theme issue
related issue: #23810
1 parent 2cda629 commit 6cdf29b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/opencode/src/cli/cmd/tui/util/terminal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function parse(color: string): RGBA | null {
1919

2020
function mode(background: RGBA | null): "dark" | "light" {
2121
if (!background) return "dark"
22-
const luminance = (0.299 * background.r + 0.587 * background.g + 0.114 * background.b) / 255
22+
const luminance = 0.299 * background.r + 0.587 * background.g + 0.114 * background.b
2323
return luminance > 0.5 ? "light" : "dark"
2424
}
2525

0 commit comments

Comments
 (0)