Here is my current code:
from PIL import ImageColor
import numpy as np
a=0
colors = [
([17, 15, 100], [50, 56, 200]),
([86, 31, 4], [220, 88, 50]),
([25, 146, 190], [62, 174, 250]),
([103, 86, 65], [145, 133, 128])
]
for (low, high) in colors:
low = np.array(low, dtype="uint8")
high = np.array(high, dtype="uint8")
#if np.array(ImageColor.getcolor('#300103', "RGB"), dtype="uint8") is in between low and high, a=1
and I want to know if a certain color is in between two colors, sort of like cv2.inRange(), but instead of seeing if a picture's pixels are in between two colors and keeping them in the picture if so, I want to see if a single color is inbetween two colors.