This any good to you ?
EDIT: Take 3
Code:
Function RGB_2_YUV(Int RGB_Color,String Matrix) {
RGB_Color=RT_BitAnd(RGB_Color,$FFFFFF)
BlankClip(Width=16,Height=16,Length=1,Color=RGB_Color)
c=ConvertToYV12(matrix=matrix)
current_frame=0
Y=c.YPlaneMin() U=c.UPlaneMin() V=c.VPlaneMin()
Col = (((Y*256)+U)*256)+V
return Col
}
RGB=$FFFFFF
Matrix= "Rec601" # "Rec601", "Rec709", "PC601", "PC709"
YUV=RGB_2_YUV(RGB,Matrix)
SRGB=RT_Hex(RGB,6)
SYUV=RT_Hex(YUV,6)
Messageclip("RGB = $"+SRGB+" : YUV=$"+SYUV + " (Matrix="+Matrix+")")