Color Management Technology
How Lamco RDP Server ensures accurate color reproduction through proper color space handling, VUI signaling, and SIMD-accelerated conversion
Why Color Matters in Remote Desktop
When you view a document locally, colors appear as the application intended. When that same document travels through a remote desktop connection, color accuracy depends on a chain of conversions and metadata that most remote desktop solutions get wrong—or ignore entirely.
The result: colors shift, whites look yellow or blue, and what you see remotely doesn't match what's actually on screen. For design work, photo editing, or any color-critical application, this makes remote desktop unusable.
Lamco RDP Server implements comprehensive color management to ensure what you see on your client matches what's on your Linux desktop.
The Color Pipeline
Every frame travels through multiple color space conversions:
Desktop Server Network Client
───────────────────────────────────────────────────────────────────────
Compositor Lamco RDP Server RDP Client
│ │ │
▼ ▼ ▼
┌────────┐ ┌────────────┐ ┌────────────┐
│ sRGB │───────────►│ BGRA→YUV │─────────────────────►│ YUV→RGB │
│ (BGRA) │ │ Conversion │ H.264 Stream │ Conversion │
└────────┘ └────────────┘ + VUI Metadata └────────────┘
│ │
▼ ▼
Color Matrix Color Matrix
(BT.709/601) (from VUI)
│ │
▼ ▼
Range Mapping Range Mapping
(Full/Limited) (from VUI)
Critical Point:
If any step uses different assumptions than the others, colors shift. Lamco RDP Server ensures consistency through proper VUI (Video Usability Information) signaling.
Color Space Standards
BT.709
The HD video standard, used for content ≥720p
| Use Case | HD/4K video, modern displays |
| Primaries | sRGB-equivalent |
| White Point | D65 (6504K) |
| Transfer | BT.709 gamma (~2.4) |
| Matrix | BT.709 coefficients |
When Lamco RDP Server uses it:
Default for HD resolutions (≥1280×720)
BT.601
The SD video standard, from the analog TV era
| Use Case | SD video, legacy content |
| Primaries | NTSC/PAL (differs from sRGB) |
| White Point | D65 |
| Transfer | BT.601 gamma |
| Matrix | BT.601 coefficients |
When Lamco RDP Server uses it:
SD resolutions (<1280×720) or explicit configuration
sRGB
The web and desktop standard, closely related to BT.709
| Use Case | Web graphics, desktop apps |
| Primaries | Same as BT.709 |
| White Point | D65 |
| Transfer | sRGB gamma (~2.2) |
| Relationship | Primaries match BT.709 |
Note:
BT.709 with full range closely approximates sRGB for desktop capture
Full Range vs Limited Range
This is where most remote desktop solutions fail.
Video standards define two value ranges, and mixing them causes color disaster.
The Problem
| Range | Values | Origin |
|---|---|---|
| Full | 0-255 | Computer graphics, desktop |
| Limited | 16-235 | Broadcast TV, video |
Your desktop uses full range. Video codecs traditionally assume limited range.
If the encoder treats full-range desktop content as limited-range video:
- Black (0) gets clipped
- White (255) gets clipped
- Contrast is crushed
- Colors look washed out
The Solution: VUI Signaling
H.264 includes Video Usability Information (VUI) metadata that tells the decoder exactly how to interpret the encoded data.
Lamco RDP Server sets VUI parameters correctly:
video_full_range_flag = 1 # Full range (0-255)
colour_primaries = 1 # BT.709
transfer_characteristics = 1 # BT.709
matrix_coefficients = 1 # BT.709
Result:
The client decoder reads this metadata and applies the correct conversion. Colors remain accurate end-to-end.
Encoder Color Support
OpenH264
Full VUI support via our enhanced integration
NVENC
Full VUI support via h264VUIParameters
VA-API
Limited VUI support due to API constraints
Recommendation:
For color-critical work, prefer NVENC or OpenH264 over VA-API. While VA-API typically produces correct colors (because most clients assume BT.709 for HD content), explicit VUI signaling isn't available.
SIMD Color Conversion
Converting BGRA desktop frames to YUV for H.264 encoding is computationally intensive. Lamco RDP Server uses SIMD (Single Instruction, Multiple Data) acceleration to process multiple pixels simultaneously.
x86_64
AVX2
~8x
speedup
ARM
NEON
~4x
speedup
Fallback
Scalar
1x
baseline
The Math (BT.709 conversion)
Each pixel conversion requires:
Y = 0.2126 R + 0.7152 G + 0.0722 B (BT.709 luminance)
Cb = (B - Y) / 1.8556
Cr = (R - Y) / 1.5748
AVX2 processes 8 pixels per instruction
NEON processes 4 pixels per instruction
This optimization is essential for real-time encoding at high resolutions. Without SIMD acceleration, 4K encoding would be impractical on most hardware.
Configuration Reference
[egfx]
# Color space selection
color_matrix = "auto" # auto, bt709, bt601, srgb
color_range = "auto" # auto, limited, full
# For explicit control:
# color_matrix = "bt709"
# color_range = "full"
color_matrix options
| auto | BT.709 for HD, BT.601 for SD |
| bt709 | Force BT.709 (recommended) |
| bt601 | Force BT.601 (legacy only) |
| srgb | sRGB (same primaries as BT.709) |
color_range options
| auto | Full for desktop capture |
| full | 0-255 (correct for desktop) |
| limited | 16-235 (broadcast video) |
Color Accuracy Comparison
How Lamco RDP Server compares to alternatives:
| Solution | Color Matrix | Range Signaling | VUI Support |
|---|---|---|---|
| Lamco RDP Server | Configurable | Full + Limited | Full |
| xrdp | Fixed | Limited only | Partial |
| gnome-remote-desktop | Auto | Unknown | Unknown |
| VNC | N/A | RGB direct | N/A |
Lamco RDP Server provides the most comprehensive color management of any Linux RDP server.