def _color_settings_3d(rgb, value, opacity, colored):
    """Return color to color 3D view item.

    Args:
        rgb (list(float)): List of minimum values of each color in rgb ([r, g, b] from 0. to 1.).
        value (float): Value of data (from 0. to 1.).
        opacity (float): Value of opacity(from 0. to 1.).
        colored (bool): If colored or grayscale.

    Returns:
        tuple(float): Color in (r, g, b, a)

    """
    color = (1.0 + 0.6 * value, 1.0 + 0.6 * value, 1.0 + 0.6 * value, 0.5 *
        opacity)
    if colored:
        color = rgb[0] + 0.6 * value, rgb[1] + 0.6 * value, rgb[2
            ] + 0.6 * value, 0.5 * opacity
    return color
