Skip to content

Commit 495de45

Browse files
committed
A colour as specified in an SVG style might have leading blanks...
1 parent aa1eeb0 commit 495de45

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mapmaker/sources/svg/rasteriser.py

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def round(x: float|int) -> int:
7979
#===============================================================================
8080

8181
def make_colour(colour_string, opacity=1.0):
82+
colour_string = colour_string.strip()
8283
if colour_string.startswith('#'):
8384
colour = webcolors.hex_to_rgb(colour_string)
8485
elif colour_string.startswith('rgb('):

0 commit comments

Comments
 (0)