What's This Do?

Programming etc.

Tag Archives: pixels

Fixing Stuck Pixels

My laptop (HP Mini 110) has a stuck green pixel. I’d seen that you could possibly unstick a pixel by polling through RGB colours until the pixel returns to normal. I couldn’t get it to work and I don’t have the patience to leave it for hours.

Anyway, here’s the quick script I knocked up to try to unstick my pixel. It’s in Python and requires the Pygame module. If anyone has any insight into how to get it to work, or if this script actually worked for you, please let me know in the comments.


import pygame


colours = ([0,0,0],

size = [400,400]
screen = pygame.display.set_mode(size)
pygame.display.set_caption("Fix my pixel")

done = False
clock = pygame.time.Clock()

loop = 0
while done == False:

	for event in pygame.event.get():
		if event.type == pygame.QUIT:
			done = True

	screen.fill(colours[loop % len(colours)])
	loop += 1


Get every new post delivered to your Inbox.

Join 232 other followers