def rrggbb(r, g, b):
    """Takes r,g,b floats and returns color code in #rrggbb format"""
    rr = '%02x' % int(r * 255)
    gg = '%02x' % int(g * 255)
    bb = '%02x' % int(b * 255)
    return '#%s%s%s' % (rr, gg, bb)
