def to_rgba(self, texstr, color='<STR_LIT>', dpi=<NUM_LIT>, fontsize=<NUM_LIT>):
x, depth = self.to_mask(texstr, dpi=dpi, fontsize=fontsize)<EOL>r, g, b = mcolors.colorConverter.to_rgb(color)<EOL>RGBA = np.zeros((x.shape[<NUM_LIT:0>], x.shape[<NUM_LIT:1>], <NUM_LIT:4>), dtype=np.uint8)<EOL>RGBA[:,:,<NUM_LIT:0>] = int(<NUM_LIT:255>*r)<EOL>RGBA[:,:,<NUM_LIT:1>] = int(<NUM_LIT:255>*g)<EOL>RGBA[:,:,<NUM_LIT:2>] = int(<NUM_LIT:255>*b)<EOL>RGBA[:,:,<NUM_LIT:3>] = x<EOL>return RGBA, depth<EOL>
*texstr*
    A valid mathtext string, eg r'IQ: $\sigma_i=15$'

*color*
    Any matplotlib color argument

*dpi*
    The dots-per-inch to render the text

*fontsize*
    The font size in points

Returns a tuple (*array*, *depth*)

  - *array* is an NxM uint8 alpha ubyte mask array of
    rasterized tex.

  - depth is the offset of the baseline from the bottom of the
    image in pixels.