// Copyright Contributors to the Open Shading Language project.
// SPDX-License-Identifier: BSD-3-Clause
// https://github.com/AcademySoftwareFoundation/OpenShadingLanguage


shader
test_color_v_space_3xu_float (output color Cout = 0)
{
    float  val = 1.0/(2*raytype("camera"));
    float val2 = val/2;

    string colorspaces[7] = { "rgb", "RGB", "hsv", "hsl", "YIQ", "XYZ", "xyY" };
    string colorspace = colorspaces[int(P[0]*64)%7];


    color c1 = color(colorspace, val, val, val);
    if (int(P[0]*32)%2==0) {
        c1 = color(colorspace, val2, val2, val2);
    }
    
    Cout = c1;
}
