def rgb_to_hex(r, g, b):
    """ Convert ``(r, g, b)`` in range [0.0, 1.0] to ``"RRGGBB"`` hex string. """
    return hex((
        ((int(r * 255) & 0xff) << 16) |
        ((int(g * 255) & 0xff) << 8) |
        (int(b * 255) & 0xff))
    )[2:]