Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (16 sloc) 0.484 kB
"""
Demonstrates using a third-party Python library
author: Jonathan Feinberg
"""
from namethatcolor import NameThatColor
flag = loadImage("flag.jpg")
namer = NameThatColor()
def setup():
size(200, 200)
def draw():
background(0)
image(flag, 75, 40 )
if mouseX >= 0 and mouseX <= width and mouseY >= 0 and mouseY <= height:
c = 0x00FFFFFF & get(mouseX, mouseY)
fill(c >> 16, c >> 8 & 0xFF, c & 0xFF)
text(namer.name(hex(c)[2:]).name, 75, 120)
Jump to Line
Something went wrong with that request. Please try again.