You just need to convert from YCbCr (YUV) to RGB since the Y in YUV is luminescence it's as modifying the intensity of the color.
The formulas can be found on wikipedia here: http://en.wikipedia.org/wiki/YCbCr
There is also an example of this implemented in JavaScript here: http://www.mikekohn.net/file_formats/yuv_rgb_converter.php
For example on Micael Kohn's page you can try setting a color in RGB and covert it to YUV. After that just lower or raise the Y value and convert it to RGB. You will notice that it's like changing the intensity.
EDIT:
Here you go, wrote an example for you, just click on the div
function yuv2rgb(Y,U,V){
R = Y + 1.4075 * (V - 128)
G = Y - 0.3455 * (U - 128) - (0.7169 * (V - 128))
B = Y + 1.7790 * (U - 128)
return { r:Math.floor(R) , g:Math.floor(G) , b:Math.floor(B)}
}
function rgb2yuv(R,G,B){
Y = R * 0.299000 + G * 0.587000 + B * 0.114000
U = R * -0.168736 + G * -0.331264 + B * 0.500000 + 128
V = R * 0.500000 + G * -0.418688 + B * -.081312 + 128
return { y:Math.floor(Y) , u:Math.floor(U) , v:Math.floor(V)}
}