
    Cj-
                    |    S SK Jr  S SKJr  S SKJr  S SKJr  S SKJ	r	  S SK
Jr  S SKJrJr  S SKJr   " S	 S
5      rg)    )annotations)Iterable)RenderableType)Segment)Style)TerminalTheme)TRANSPARENTColor)ANSIToTruecolorc                  Z    \ rS rSrSr      SS jr\\4         SS jj5       rSr	g)	Tint   z1Applies a color on top of an existing renderable.c                    Xl         X l        g)zzWrap a renderable to apply a tint color.

Args:
    renderable: A renderable.
    color: A color (presumably with alpha).
N)
renderablecolor)selfr   r   s      j/home/rurouni/.local/share/pipx/venvs/strix-agent/lib/python3.13/site-packages/textual/renderables/tint.py__init__Tint.__init__   s     %
    c              #    #    [         R                  n[        R                  n[        n[        U5      R                  nUR                  n	[        5       n
U H  nUu  pnU(       a  Uv   M  Ub  U" X5      OU
nU" UUU" UR                  b  U" UR                  5      U-   R                  OSUR                  b  U" UR                  5      U-   R                  OS5      -   U5      v   M     g7f)zApply tint to segments.

Args:
    segments: Incoming segments.
    color: Color of tint.
    ansi_theme: The TerminalTheme defining how to map ansi colors to hex.
    background: Background color.

Returns:
    Segments with applied tint.
N)
r
   from_rich_colorr   
from_colorr   r   truecolor_style
rich_colorr   bgcolor)clssegmentsr   
ansi_theme
backgroundr   style_from_color_Segmentr   background_rich_color
NULL_STYLEsegmenttextstylecontrols                  r   process_segmentsTint.process_segments   s     &  // ++)*5EE * 5 5W
G#* D ( $EA# 
 * $);;#: "1!=!E Q Q%) $)==#< "1!?%!G S S%) #   s   C)C+)r   r   N)r   r   r   r
   returnNone)
r   Iterable[Segment]r   r
   r   r   r    r
   r+   r-   )
__name__
__module____qualname____firstlineno____doc__r   classmethodr	   r)   __static_attributes__ r   r   r   r      so    ;"  
	  (6#6 6 "	6
 6 
6 6r   r   N)
__future__r   typingr   rich.consoler   rich.segmentr   
rich.styler   rich.terminal_themer   textual.colorr	   r
   textual.filterr   r   r5   r   r   <module>r>      s)    "  '    - , *H Hr   