Most likely, the wording of the question is not correct, but I can't think of how to word it. Adobe Premiere Pro has a green screen option and you can tell it to remove the color you selected and all similar colors within a range (ex: I have a green and it removes that green and some lighter and darker greens. My question It is if something similar can be done (that is, detect all the green ones, for example) in opencv with python.
Yes you can, it's called segmentation by color I leave you a good tutorial that talks about it: https://realpython.com/python-opencv-color-spaces/
In the same way I leave you a good PDF if you want to understand how the algorithmic and mathematical part of segmentation works, you don't have to read everything, I think the first pages will give you more or less an idea.