function ConvertValue (n, h, s, v)
{
    var k = (n + h * 6) % 6;

    var min = Math.min(k, 4 - k, 1);

    return Math.round(255 * (v - v * s * Math.max(0, min)));
}
RGB space conversion.

@ignore

@param {number} n - The value to convert.
@param {number} h - The h value.
@param {number} s - The s value.
@param {number} v - The v value.

@return {number} The converted value.