From 7160929f0fab5b26d01e1a1901f7d80eb0cec447 Mon Sep 17 00:00:00 2001 From: David Huggins-Daines Date: Tue, 19 Nov 2024 23:50:26 -0500 Subject: [PATCH] fix: use num_value for colors --- playa/color.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playa/color.py b/playa/color.py index 5c67b78..f60f597 100644 --- a/playa/color.py +++ b/playa/color.py @@ -3,7 +3,7 @@ from playa.exceptions import PDFInterpreterError from playa.parser import LIT, PDFObject, PSLiteral -from playa.pdftypes import float_value, list_value, literal_name, stream_value +from playa.pdftypes import num_value, list_value, literal_name, stream_value LITERAL_DEVICE_GRAY = LIT("DeviceGray") LITERAL_DEVICE_RGB = LIT("DeviceRGB") @@ -59,7 +59,7 @@ def make_color(self, *components) -> Color: cc: List[float] = [] for x in components[0 : self.ncomponents]: try: - cc.append(float_value(x)) + cc.append(num_value(x)) except TypeError: cc.append(0.0) while len(cc) < self.ncomponents: