def DarkenBitmap(bmp, caption_colour, new_colour):
    """
    Darkens the input bitmap on wxMAC using the input colour.

    :param wx.Bitmap `bmp`: the bitmap to be manipulated;
    :param wx.Colour `caption_colour`: the colour of the pane caption;
    :param wx.Colour `new_colour`: the colour used to darken the bitmap.
    """
    image = bmp.ConvertToImage()
    red = caption_colour.Red() / float(new_colour.Red())
    green = caption_colour.Green() / float(new_colour.Green())
    blue = caption_colour.Blue() / float(new_colour.Blue())
    image = image.AdjustChannels(red, green, blue)
    return image.ConvertToBitmap()
