'Generate colored image in Python using ndarray

I am using the following code to generate a colored filter on an image in Python. However, it gives me a full green/blue/red image. I want to decrease the intensity of the color and make the color a bit translucent so I can still see the image. Please tell me how I can modify the following code to do that.

im = np.array(Image.open('data/src/lena_square.png'))

im_R = im.copy()
im_R[:, :, (1, 2)] = 0
im_G = im.copy()
im_G[:, :, (0, 2)] = 0
im_B = im.copy()
im_B[:, :, (0, 1)] = 0


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source