Skip to main content
The Virtual Display Driver provides advanced color management through configurable color spaces, gamma correction, and precise chromaticity coordinates.

Color Space Configuration

Configure color space settings in the hdr_advanced section:
<hdr_advanced>
  <color_space>
    <enabled>true</enabled>
    <gamma_correction>2.4</gamma_correction>
    <primary_color_space>Rec.2020</primary_color_space>
    <enable_matrix_transform>true</enable_matrix_transform>
  </color_space>
</hdr_advanced>
enabled
boolean
default:"false"
Enable advanced color space processing. When disabled, driver uses default sRGB.
gamma_correction
double
default:"2.4"
Gamma curve exponent. Common values:
  • 2.2 - sRGB standard gamma
  • 2.4 - Rec.2020/HDR gamma
  • 2.6 - DCI-P3 cinema gamma
primary_color_space
enum
default:"sRGB"
Primary color space selection:
  • sRGB - Standard RGB (most compatible)
  • Rec.709 - HD video standard (identical to sRGB)
  • Rec.2020 - UHD/HDR wide gamut
  • DCI-P3 - Digital cinema wide gamut
  • Adobe_RGB - Photography wide gamut
enable_matrix_transform
boolean
default:"false"
Enable 3×4 color space transformation matrix for advanced color conversion.

Supported Color Spaces

sRGB (Standard RGB)

<color_space>
  <enabled>true</enabled>
  <gamma_correction>2.2</gamma_correction>
  <primary_color_space>sRGB</primary_color_space>
</color_space>
Characteristics:
  • Gamma: 2.2
  • White point: D65 (0.3127, 0.3290)
  • Most widely supported
  • Best compatibility

Rec.2020 (UHD/HDR)

<color_space>
  <enabled>true</enabled>
  <gamma_correction>2.4</gamma_correction>
  <primary_color_space>Rec.2020</primary_color_space>
  <enable_matrix_transform>true</enable_matrix_transform>
</color_space>
Characteristics:
  • Gamma: 2.4 (PQ or HLG for HDR)
  • Widest color gamut
  • Required for HDR10
  • Requires 10-bit color depth

DCI-P3 (Digital Cinema)

<color_space>
  <enabled>true</enabled>
  <gamma_correction>2.6</gamma_correction>
  <primary_color_space>DCI-P3</primary_color_space>
  <enable_matrix_transform>true</enable_matrix_transform>
</color_space>
Characteristics:
  • Gamma: 2.6
  • Wide gamut (between sRGB and Rec.2020)
  • Common for content creation
  • Requires 10-bit color depth

Color Primaries

Define precise chromaticity coordinates for custom color spaces:
<hdr_advanced>
  <color_primaries>
    <enabled>true</enabled>
    <red_x>0.708</red_x>
    <red_y>0.292</red_y>
    <green_x>0.170</green_x>
    <green_y>0.797</green_y>
    <blue_x>0.131</blue_x>
    <blue_y>0.046</blue_y>
    <white_x>0.3127</white_x>
    <white_y>0.3290</white_y>
  </color_primaries>
</hdr_advanced>

Standard Primaries

sRGB/Rec.709:
<red_x>0.640</red_x>   <red_y>0.330</red_y>
<green_x>0.300</green_x> <green_y>0.600</green_y>
<blue_x>0.150</blue_x>  <blue_y>0.060</blue_y>
<white_x>0.3127</white_x> <white_y>0.3290</white_y>  <!-- D65 -->
Rec.2020:
<red_x>0.708</red_x>   <red_y>0.292</red_y>
<green_x>0.170</green_x> <green_y>0.797</green_y>
<blue_x>0.131</blue_x>  <blue_y>0.046</blue_y>
<white_x>0.3127</white_x> <white_y>0.3290</white_y>  <!-- D65 -->
DCI-P3:
<red_x>0.680</red_x>   <red_y>0.320</red_y>
<green_x>0.265</green_x> <green_y>0.690</green_y>
<blue_x>0.150</blue_x>  <blue_y>0.060</blue_y>
<white_x>0.3127</white_x> <white_y>0.3290</white_y>  <!-- D65 -->
Color primaries are converted to SMPTE ST.2086 format (0-50000 range) for HDR metadata. See Driver.cpp:851-857 for conversion logic.

Gamma Correction

Gamma correction controls the brightness curve of the display:

Standard Gamma Values

GammaUse CaseDescription
2.2sRGBStandard computer displays
2.4Rec.2020HDR/UHD content
2.6DCI-P3Digital cinema
1.0LinearNo correction (raw data)

Custom Gamma Configuration

<color_space>
  <enabled>true</enabled>
  <gamma_correction>2.35</gamma_correction>  <!-- Custom value -->
  <primary_color_space>sRGB</primary_color_space>
</color_space>

Color Space Transformation Matrix

When enable_matrix_transform is enabled, the driver generates a 3×4 color space transformation matrix:
// Matrix structure (Driver.cpp:681-684)
struct VddColorMatrix {
    FLOAT matrix[3][4];  // 3x4 transformation matrix
    bool isValid;
};

Matrix Generation

The driver automatically generates conversion matrices (Driver.cpp:700-759): sRGB to sRGB (identity with gamma):
[γ/2.2,  0,      0,      0]
[0,      γ/2.2,  0,      0]
[0,      0,      γ/2.2,  0]
DCI-P3 to sRGB:
[1.2249*(γ/2.4), -0.2247,         0,               0]
[-0.0420,         1.0419*(γ/2.4), 0,               0]
[-0.0196,        -0.0786,         1.0982*(γ/2.4),  0]
Rec.2020 to sRGB:
[1.7347*(γ/2.4), -0.7347,         0,               0]
[-0.1316,         1.1316*(γ/2.4), 0,               0]
[-0.0241,        -0.1289,         1.1530*(γ/2.4),  0]
Matrix transforms require significant GPU processing. Only enable for wide gamut color spaces (DCI-P3, Rec.2020) when necessary.

Automatic Bit Depth Selection

The driver can automatically select bit depth based on color space:
<color_advanced>
  <bit_depth_management>
    <auto_select_from_color_space>true</auto_select_from_color_space>
  </bit_depth_management>
</color_advanced>
Automatic selection logic (Driver.cpp:798-823):
  • Rec.2020 → 10-bit
  • DCI-P3 → 10-bit
  • Adobe_RGB → 10-bit
  • sRGB/Rec.709 → 8-bit

Configuration Examples

HDR10 Wide Gamut Setup

<hdr_advanced>
  <color_space>
    <enabled>true</enabled>
    <gamma_correction>2.4</gamma_correction>
    <primary_color_space>Rec.2020</primary_color_space>
    <enable_matrix_transform>true</enable_matrix_transform>
  </color_space>
  
  <color_primaries>
    <enabled>true</enabled>
    <red_x>0.708</red_x>
    <red_y>0.292</red_y>
    <green_x>0.170</green_x>
    <green_y>0.797</green_y>
    <blue_x>0.131</blue_x>
    <blue_y>0.046</blue_y>
    <white_x>0.3127</white_x>
    <white_y>0.3290</white_y>
  </color_primaries>
</hdr_advanced>

<color_advanced>
  <bit_depth_management>
    <auto_select_from_color_space>true</auto_select_from_color_space>
  </bit_depth_management>
</color_advanced>

Professional sRGB Setup

<hdr_advanced>
  <color_space>
    <enabled>true</enabled>
    <gamma_correction>2.2</gamma_correction>
    <primary_color_space>sRGB</primary_color_space>
    <enable_matrix_transform>false</enable_matrix_transform>
  </color_space>
  
  <color_primaries>
    <enabled>true</enabled>
    <red_x>0.640</red_x>
    <red_y>0.330</red_y>
    <green_x>0.300</green_x>
    <green_y>0.600</green_y>
    <blue_x>0.150</blue_x>
    <blue_y>0.060</blue_y>
    <white_x>0.3127</white_x>
    <white_y>0.3290</white_y>
  </color_primaries>
</hdr_advanced>

Cinema DCI-P3 Setup

<hdr_advanced>
  <color_space>
    <enabled>true</enabled>
    <gamma_correction>2.6</gamma_correction>
    <primary_color_space>DCI-P3</primary_color_space>
    <enable_matrix_transform>true</enable_matrix_transform>
  </color_space>
  
  <color_primaries>
    <enabled>true</enabled>
    <red_x>0.680</red_x>
    <red_y>0.320</red_y>
    <green_x>0.265</green_x>
    <green_y>0.690</green_y>
    <blue_x>0.150</blue_x>
    <blue_y>0.060</blue_y>
    <white_x>0.3127</white_x>
    <white_y>0.3290</white_y>
  </color_primaries>
</hdr_advanced>

<color_advanced>
  <bit_depth_management>
    <force_bit_depth>10</force_bit_depth>
  </bit_depth_management>
</color_advanced>

EDID Integration

Color profiles can be automatically loaded from EDID files:
<edid_integration>
  <enabled>true</enabled>
  <auto_configure_from_edid>true</auto_configure_from_edid>
</edid_integration>
The driver extracts from monitor_profile.xml:
  • Color primaries (chromaticity coordinates)
  • Gamma value
  • Primary color space name
  • White point
See Custom EDID for details.

SDR White Level

Configure SDR white level for HDR displays:
<color_advanced>
  <color_format_extended>
    <sdr_white_level>80.0</sdr_white_level>
  </color_format_extended>
</color_advanced>
Standard values:
  • 80 nits - Standard SDR on HDR displays
  • 100 nits - Brighter SDR content
  • 120 nits - Maximum recommended
SDR white level is used when displaying SDR content on HDR-capable displays to maintain consistent brightness.

Verification

Enable logging to verify color configuration:
<logging>
  <logging>true</logging>
  <debuglogging>true</debuglogging>
</logging>
Log output shows:
[INFO] Generated Gamma Ramp from EDID profile:
  Gamma: 2.4 (from 2.400)
  Color Space: Rec.2020
  Matrix Transform: Enabled
  3x4 Matrix:
    [1.73, -0.73, 0.00, 0.00]
    [-0.13, 1.13, 0.00, 0.00]
    [-0.02, -0.13, 1.15, 0.00]

Windows Requirements

Advanced color management requires:
  • Windows 10 version 1803 or later for wide gamut support
  • IddCx 1.4 or later for matrix transforms
  • Compatible GPU with color space conversion support

Build docs developers (and LLMs) love