def rgb2int(r, g, b):
    """ rgba2int: Converts an RGB value into an integer

    :param r The red value (0-255)
    :param g The green value (0-255)
    :param b The blue value (0-255)

    :returns: The RGB value compact into a 24 byte integer.
    """
    r, g, b = int(abs(r)), int(abs(g)), int(abs(b))
    return (r << 16) + (g << 8) + b