ScratchData LogoScratchData
Back to OriginallySystemized's profile

RGB Color Detector

OROriginallySystemized•Created April 26, 2017
RGB Color Detector
4
4
124 views
View on Scratch

Instructions

Move the mouse and click on a colour (including black & white parts of the background). Hit space to switch between colour gradients & new set of lines. Just something quickly thrown together from r2dav2's 'glitch'...

Description

The colour checker appears to only check the first 5 bits of the red & green components, and the first 4 bits of the blue component. This means the total checks needed to find a match is 32*32*16, rather than the expected 256*256*256 (which is >16 million). It also means, for example, 'white' would match: red=248 to 255, green=248 to 255, blue=240 to 255 while 'black' would match: red=0 to 7, green=0 to 7, blue=0 to 15. The 24-bit RGB value is red*65536+green*256+blue.

Project Details

Project ID157358820
CreatedApril 26, 2017
Last ModifiedApril 26, 2017
SharedApril 26, 2017
Visibilityvisible
CommentsAllowed