Skip to content

Commit

Permalink
fix: use num_value for colors
Browse files Browse the repository at this point in the history
  • Loading branch information
dhdaines committed Nov 20, 2024
1 parent 443d883 commit 7160929
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions playa/color.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 7160929

Please sign in to comment.