diff --git a/wx/svg/_nanosvg.pyx b/wx/svg/_nanosvg.pyx index 68b3486d..51951ebb 100644 --- a/wx/svg/_nanosvg.pyx +++ b/wx/svg/_nanosvg.pyx @@ -518,6 +518,15 @@ cdef class SVGgradientStop: self._check_ptr() return self._ptr.color + @property + def color_rgba(self) -> tuple: + """ Returns color as a RGBA tuple """ + c = self.color + return ( c & 0xff, + (c >> 8) & 0xff, + (c >> 16) & 0xff, + (c >> 24) & 0xff) + @property def offset(self) -> float: self._check_ptr()