Let`s start with image:

My current task is to print the text from image with using pytesseract.
import cv2
import pytesseract
pytesseract.pytesseract.tesseract_cmd = "tesseract/tesseract.exe"
image_path = 'img4.png'
img = cv2.imread(image_path)
# cropped_img = img[195:820, 760:1160] this is for other photo
gray_img = cv2.cvtColor(img, cv2.COLOR_BGRA2GRAY) # COLOR_BGRA2GRAY
text = pytesseract.image_to_string(gray_img, config='--oem 3 --psm 6')
print(text)
And program print this:
Day 1382, 03:23:17:
Because the rad text is converting to soo dark gray color and tesseract don`t see it.

I`ve already tried many ways to convert this dark color but, all of them are too old and nothing helped me.
for ex. this code:
new_img = np.where(
(gray_img == 31).all(axis=2),
np.full_like(gray_img, 255),
gray_img,
)

The problem can be fixed.
Snippet:
Output: