If someone hast the problem that his color range is reduced, I have converted the little code THCM has linked to Purebasic (without the message requesters). If you need it, feel free to use it.
; Begin
Pointer.l = 0 ; Handler of the key
lpType.l = 0 ; Registry Pointer Typ
lpData.s = Space(256) ; Pointer to the data
lpcbData.l = 255 ; Memory Size
If 0 <> RegOpenKey_(#HKEY_LOCAL_MACHINE,"HARDWARE\DEVICEMAP\VIDEO",@Pointer)
MessageRequester("Regkey could not be read","HARDWARE\DEVICEMAP\VIDEO",0)
End
EndIf
RegQueryValueEx_(Pointer,"\Device\Video0",0,@lpType,@lpData,@lpcbData)
RegCloseKey_(Pointer): Pointer = 0
lpData = Left(lpData,Len(lpData))
lpData = Right(lpData,Len(lpData)-Len("\Registry\Machine\"))
If 0 <> RegOpenKey_(#HKEY_LOCAL_MACHINE,lpData,@Pointer)
MessageRequester("Regkey could not be read",lpData,0)
End
EndIf
ValueX.l = 3 ; 1: Reduced color range 3: Full color range
RegSetValueEx_(Pointer,"VMRCCCSStatus",0,#REG_DWORD,@ValueX,4)
RegCloseKey_(Pointer): Pointer = 0
; End