You can get colors as shown here
If you are not using Windows you could try termcolor to do something like this:
from termcolor import colored
text=input("Enter search word :")
with open("demo.txt", "r") as searchfile:
    for line in searchfile:
        if text in line:
            print(colored(text,'red').join(line.split(text)))
Example:
s = "123 321 123 321 123"
print(colored("321",'red').join(s.split("321")))
With output:

If you do use windows, you could still run the same code as above, as long as you add the following two lines at the beginning of your script:
from colorama import init
init()
Both libraries are pip-installable and lightweight.