def int_hex(r, g, b):
    """converts rgb to a hex string"""
    hex_value = '#'
    hexr = hex(r)[2:]
    if len(hexr) == 1:
        hex_value += '0' + hexr
    else:
        hex_value += hexr
    hexg = hex(g)[2:]
    if len(hexg) == 1:
        hex_value += '0' + hexg
    else:
        hex_value += hexg
    hexb = hex(b)[2:]
    if len(hexb) == 1:
        hex_value += '0' + hexb
    else:
        hex_value += hexb
    return hex_value
