Skip to content

Commit e06e80e

Browse files
committed
Update terminal-color-detection.ts
1 parent dff3913 commit e06e80e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cli/src/utils/terminal-color-detection.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* This only works on terminals that support these queries (iTerm2, Terminal.app, Alacritty, etc.)
66
*
77
* IMPORTANT: This implementation writes directly to /dev/tty to avoid interfering with
8-
* Ink's stdout/stdin handling in the CLI app.
8+
* OpenTUI's stdout/stdin handling in the CLI app.
99
*/
1010

1111
import { openSync, closeSync, writeSync, createReadStream } from 'fs'
@@ -203,7 +203,9 @@ export function parseOSCResponse(
203203
* @returns Brightness value 0-255
204204
*/
205205
function calculateBrightness([r, g, b]: [number, number, number]): number {
206-
return Math.floor(LUMINANCE_RED * r + LUMINANCE_GREEN * g + LUMINANCE_BLUE * b)
206+
return Math.floor(
207+
LUMINANCE_RED * r + LUMINANCE_GREEN * g + LUMINANCE_BLUE * b,
208+
)
207209
}
208210

209211
function themeFromRgb(rgb: [number, number, number]): ThemeName {

0 commit comments

Comments
 (0)