We could cope with the argument name change from alpha to hasAlpha between ReportLab 2.6 and 2.7, but Under ReportLab 2.6, both HexColor('#8080F780') and HexColor('#8080F780', alpha=True) fail with: Traceback (most recent call last): File ".../site-packages/reportlab/lib/colors.py", line 365, in HexColor return Color((val>>24)&0xFF/255.0,((val>>16)&0xFF)/255.0,((val>>8)&0xFF)/255.0,(val&0xFF)/255.0) TypeError: unsupported operand type(s) for &: 'int' and 'float' Essentially we seem to need at least ReportLab 2.7 for transparency. See discussion on GitHub #458 and #463.
Implemented bugfix suggested by Peter Cock.
bgcolor and fgcolor attributes of KGML elements now render with transparency if an alpha channel is specified either as a 4-element tuple, 4-value hex string, or Reportlab Color object. The test_KGML_graphics.py tests are modified to test transparency of stroke (fgcolor) and fill (bgcolor).