Files
anomalyco__opentui/scripts
KeremP dd87918e3d feat: add support for transparent terminal background rendering (#225)
This addresses https://github.com/sst/opentui/issues/184 by defaulting
to terminal background if renderer alpha channel is 0.

The transparent background can be set by using
`renderer.setBackgroundColor("transparent")` for example in
`packages/react/examples/basic.tsx`.
```diff
import { bold, fg, italic, t, TextAttributes } from "@opentui/core"
import { render, useKeyboard, useRenderer } from "@opentui/react"
import { useCallback, useState } from "react"

export const App = () => {
  const renderer = useRenderer()
+  renderer.setBackgroundColor("transparent")
  const [username, setUsername] = useState("")
  const [password, setPassword] = useState("")
```

Example in ghostty
<img width="852" height="670" alt="image"
src="https://github.com/user-attachments/assets/658703ad-77a6-4624-b07c-5a24bbf8447c"
/>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-25 17:25:18 +02:00
..
2025-10-01 11:24:16 +02:00