Skip to content

Commit bf5774f

Browse files
committed
Fix tint
1 parent 1bf7d21 commit bf5774f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/textual/filter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,13 @@ def apply(self, segments: list[Segment], background: Color) -> list[Segment]:
202202
_Segment = Segment
203203
_dim_style = dim_style
204204
factor = self.dim_factor
205+
background_rich_color = background.rich_color
205206

206207
return [
207208
(
208209
_Segment(
209210
segment.text,
210-
_dim_style(segment.style, background, factor),
211+
_dim_style(segment.style, background_rich_color, factor),
211212
None,
212213
)
213214
if segment.style is not None and segment.style.dim

src/textual/renderables/tint.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def process_segments(
5252
_Segment = Segment
5353

5454
truecolor_style = ANSIToTruecolor(ansi_theme).truecolor_style
55+
background_rich_color = background.rich_color
5556

5657
NULL_STYLE = Style()
5758
for segment in segments:
@@ -60,7 +61,7 @@ def process_segments(
6061
yield segment
6162
else:
6263
style = (
63-
truecolor_style(style, background)
64+
truecolor_style(style, background_rich_color)
6465
if style is not None
6566
else NULL_STYLE
6667
)

0 commit comments

Comments
 (0)