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


shader
test_color_v_space_3xv_dfloat (output color Cout = 0)
{
    float valr = 0.5*(v);
    float valg = 0.6*(v);
    float valb = 0.4*(v);
    float val2r = u;
    float val2g = 0.3*u;
    float val2b = 0.75*u;

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


    color c1 = color(colorspace, valr, valg, valb);
    if (int(P[0]*32)%2==0) {
        c1 = color(colorspace, val2r, val2g, val2b);
    }
    
    color dxc = Dx(c1);
    color dyc = Dy(c1);
    Cout = dxc + dyc;
}
