如何在pygame中获取像素的颜色值?

svs*_*svs 2 python pygame

我想获取像素的颜色值。我读过一些有关名为“pygame.Surface.get_at()”的函数的内容。但是当我使用这个函数时我得到这个错误:

Traceback (most recent call last):
pygame.Surface.get_at(300, 200)
TypeError: descriptor 'get_at' requires a 'pygame.Surface' object but received a 'int'
Run Code Online (Sandbox Code Playgroud)

enr*_*cis 5

你这里有两个问题: