Create outline for Opacity renderable

This commit is contained in:
Darren Burns
2022-02-08 17:17:03 +00:00
parent 17d1ed335a
commit 06749bf7af
2 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
from rich.console import ConsoleOptions, Console, RenderResult, RenderableType
class Opacity:
"""Return a renderable with the foreground color blended into the background color.
Args:
renderable (RenderableType): The RenderableType to manipulate.
value (float): The opacity as a float. A value of 1.0 means text is fully visible.
"""
def __init__(self, renderable: RenderableType, value: float = 1.0) -> None:
self.renderable = renderable
self.value = value
def __rich_console__(
self, console: Console, options: ConsoleOptions
) -> RenderResult:
pass

View File