Gamma Class
Gamma is a class to change the Gamma on the monitor.
Warning: If your application crashes for some reason before you reset your Gammas then you need to restore the System Gammas by re-calibrating your screen, or possibly zap your PRAM. The Gamma class will restore the Gamma settings for you when the class is terminated if you have not done so already.
Do not create more than one instance of the Gamma class unless you have some very special reason and that you are sure of what you are doing, again such incorrect usage might lead to need for zapping the PRAM to restore the system Gammas. On Win32 systems Gammas are restored in such situations by restarting the machine.
Note:Gammas on Windows work a bit different than on MacOS, that is pure white on Windows does not change with the Gamma ramp. In general then Windows systems do not support setting hardware Gammas directly.
Most Windows systems now-days do not allow you to set System wide Gammas with those API's
Properties
CanSetGamma | Use this property to get information on if the current can set gamma or not. |
DisplayCount | Returns the number of displays or devices that can have their gamma set. |
MainDisplayNumber | Returns the number of the Main display device. |
Successful | Use this property to get information on if Gamma change was successful. |
Value | Use this property to set a new Gamma value. |
Methods
GetDisplayGammaRamp | Use this function to get a Gamma Ramp for a specific display device. |
Restore | Use this method to restore the Gammas that were the monitors active Gamma tables when the class was constructed. |
SetDisplayGammaRamp | Sets a GammaRamp for a specific display device. |
SetDisplayGammaRamp | Sets a GammaRamp and color for a specific display device. |
SetDisplayGammaValue | Sets a Gamma value for a specific display device. |
Supported Platforms:
macOS Cocoa 32 bitmacOS Cocoa 64 bitmacOS Apple SiliconUnsupported Platforms:
Windows 32 bitWindows 64 bitLinux 32 bitLinux 64 bitLinux ARM 32 bit