Ternary: Added possibility to switch between local and global range
Ternary: Compute color based on local/global min/max values