Rainbow vomit

<----------------------------------------------------------------->  
There is such as thing as a tomcat but have you ever heard of a tomdog.
This is the most important question of our time, and unfortunately one that may never be answered by modern science. 
The definition of tomcat is a male cat, yet the name for a male dog is max.
Wait no. the name for a male dog is just dog. regardless, what would happen if we were to combine a male dog with a tomcat.
Perhaps wed end up with a dog that vomits out flags, like this one rtcp should,fl5g4,b3,st1cky,or,n0t
<----------------------------------------------------------------->

there was a typo (lol) so...

rtcp{should,fl4g5,b3,st1cky,or,n0t}

def conv(a):
    pp = [
    [(0, 0, 255), (0, 255, 255), (255, 0, 255), (255, 0, 0), (255, 255, 0), (0, 255, 0)],"t",
    [(0, 255, 0), (255, 255, 0), (255, 0, 0), (0, 0, 255), (0, 255, 255), (255, 0, 255)],"h",
    [(255, 0, 0), (0, 255, 0), (255, 255, 0), (0, 0, 255), (255, 0, 255), (0, 255, 255)],"e",
    [(0, 0, 255), (0, 255, 255), (255, 255, 0), (255, 0, 255), (255, 0, 0), (0, 255, 0)],"r",
    [(255, 255, 255), (255, 255, 255), (255, 255, 255), (255, 255, 255), (255, 255, 255), (255, 255, 255)]," ",
    [(0, 255, 0), (255, 255, 0), (0, 0, 255), (255, 0, 0), (0, 255, 255), (255, 0, 255)],"i",
    [(0, 0, 255), (0, 255, 255), (255, 0, 255), (255, 255, 0), (255, 0, 0), (0, 255, 0)],"s",
    [(0, 0, 255), (0, 255, 255), (255, 0, 255), (255, 0, 0), (0, 255, 0), (255, 255, 0)],"u",
    [(255, 0, 0), (0, 255, 0), (255, 0, 255), (255, 255, 0), (0, 0, 255), (0, 255, 255)],"c",
    [(255, 0, 255), (255, 0, 0), (0, 255, 0), (255, 255, 0), (0, 0, 255), (0, 255, 255)],"a",
    [(255, 255, 0), (0, 0, 255), (0, 255, 255), (0, 255, 0), (255, 0, 255), (255, 0, 0)],"n",
    [(0, 255, 0), (255, 0, 0), (255, 255, 0), (0, 0, 255), (0, 255, 255), (255, 0, 255)],"g",
    [(255, 255, 0), (0, 0, 255), (0, 255, 255), (255, 0, 255), (0, 255, 0), (255, 0, 0)],"o",
    [(255, 255, 0), (0, 0, 255), (0, 255, 0), (0, 255, 255), (255, 0, 255), (255, 0, 0)],"m",
    [(255, 0, 0), (255, 0, 255), (0, 255, 0), (255, 255, 0), (0, 0, 255), (0, 255, 255)],"b",
    [(0, 255, 255), (0, 0, 255), (255, 0, 255), (255, 0, 0), (0, 255, 0), (255, 255, 0)],"v",
    [(0, 255, 255), (255, 0, 255), (255, 0, 0), (0, 255, 0), (0, 0, 255), (255, 255, 0)],"y",
    [(255, 0, 0), (0, 255, 0), (255, 255, 0), (255, 0, 255), (0, 0, 255), (0, 255, 255)],"d",
    [(255, 0, 0), (0, 255, 0), (255, 255, 0), (0, 0, 255), (0, 255, 255), (255, 0, 255)],"f",
    [(0, 0, 0), (255, 255, 255), (255, 255, 255), (0, 0, 0), (0, 0, 0), (255, 255, 255)],".",
    [(255, 255, 0), (0, 0, 255), (0, 255, 255), (255, 0, 255), (255, 0, 0), (0, 255, 0)],"p",
    [(0, 0, 255), (255, 255, 0), (0, 255, 255), (255, 0, 255), (255, 0, 0), (0, 255, 0)],"q",
    [(255, 255, 255), (0, 0, 0), (0, 0, 0), (255, 255, 255), (255, 255, 255), (0, 0, 0)],",",
    [(255, 255, 0), (0, 255, 0), (0, 0, 255), (0, 255, 255), (255, 0, 255), (255, 0, 0)],"l",
    [(0, 255, 255), (255, 0, 255), (0, 0, 255), (255, 0, 0), (0, 255, 0), (255, 255, 0)],"w",
    [(0, 255, 255), (255, 0, 255), (255, 0, 0), (0, 0, 255), (0, 255, 0), (255, 255, 0)],"x",
    [(0, 255, 0), (255, 255, 0), (0, 0, 255), (0, 255, 255), (255, 0, 0), (255, 0, 255)],"j",
    [(0, 255, 0), (255, 255, 0), (0, 0, 255), (0, 255, 255), (255, 0, 255), (255, 0, 0)],"k",
    [(255, 255, 255), (128, 128, 128), (0, 0, 0), (128, 128, 128), (255, 255, 255), (0, 0, 0)],"5",
    [(128, 128, 128), (255, 255, 255), (0, 0, 0), (128, 128, 128), (255, 255, 255), (0, 0, 0)],"4",
    [(128, 128, 128), (255, 255, 255), (0, 0, 0), (128, 128, 128), (0, 0, 0), (255, 255, 255)],"3",
    [(128, 128, 128), (0, 0, 0), (255, 255, 255), (0, 0, 0), (128, 128, 128), (255, 255, 255)],"1",
    [(0, 0, 0), (128, 128, 128), (255, 255, 255), (0, 0, 0), (128, 128, 128), (255, 255, 255)],"0",
    ]
    if a not in pp:
        print(a)
        int("lol")
    else:
        return pp[pp.index(a)+1]

def rainbow():
    from PIL import Image #104 x 34

    im = Image.open('output.png', 'r')
    pix_val = list(im.getdata())

    var = []
    cc = ""

    e = [bytes((x,)) for y in pix_val for x in y]

    for i in range(10):
        for j in range(50):
            var.append([
                pix_val[210+j*2+(i*3+0)*104],pix_val[210+j*2+(i*3+0)*104+1],
                pix_val[210+j*2+(i*3+1)*104],pix_val[210+j*2+(i*3+1)*104+1],
                pix_val[210+j*2+(i*3+2)*104],pix_val[210+j*2+(i*3+2)*104+1]])

    for i in var:
        cc += conv(i)
    print(cc)

rainbow()

Last updated