def check_rgb_match(sample_rgb, target_rgb, precision):
    """Check if a triplet of some sample RGB values can be considered to be the same as a triplet of some target RGB values."""
    return abs(sum(sample_rgb) - sum(target_rgb)) <= precision