def _rgb(info, x, y, z):
    """Helper to transform x, y, z values into RGB colors"""
    all_pos = np.array([ch['loc'][:3] for ch in info['chs']])
    for idx, dim in enumerate([x, y, z]):
        this_pos = all_pos[:, idx]
        dim_min = this_pos.min()
        dim_max = (this_pos - dim_min).max()
        dim -= dim_min
        dim /= dim_max
    return np.asarray([x, y, z]).T
dataset/ETHPy150Open mne-tools/mne-python/mne/viz/evoked.py/_rgb/original