Example #1
0
    static void fillColor(PLStream pl, out int[] r, out int[] g, out int[] b)
    {
        r = new int[116];
        g = new int[116];
        b = new int[116];

        double lmin = 0.15, lmax = 0.85;

        for (int i = 0; i <= 15; i++)
        {
            pl.gcol0(i, out r[i], out g[i], out b[i]);
        }

        for (int i = 0; i <= 99; i++)
        {
            double h, l, s;
            double r1, g1, b1;

            h = (360.0 / 10.0) * (i % 10);
            l = lmin + (lmax - lmin) * (i / 10) / 9.0;
            s = 1.0;

            pl.hlsrgb(h, l, s, out r1, out g1, out b1);
            r[i + 16] = (int)(r1 * 255.001);
            g[i + 16] = (int)(g1 * 255.001);
            b[i + 16] = (int)(b1 * 255.001);
        }
    }