PIL:如何使用ImageGrab获得全部颜色范围

我想获取存储在变量中的全部颜色。

Using ImageGrab, how can I get the whole color range of a specific color, rather than writing each shade one-by-one?

while True:
    rgb = PIL.ImageGrab.grab().load()[960,540]
    if rgb == (1, 0, 0) or rgb == (2, 0, 0) or rgb == (3, 0, 0):