Method TryParseOscColorResponse
TryParseOscColorResponse(string?, out Color?)
Attempts to parse an OSC 10/11 color response into a Color.
public static bool TryParseOscColorResponse(string? response, out Color? color)
Parameters
responsestringThe raw response string, e.g.
ESC]10;rgb:RRRR/GGGG/BBBB ESC</code> orESC]11;rgb:RR/GG/BB BEL.colorColor?The parsed color, or null if parsing fails.
Returns
Remarks
Handles both 4-digit (16-bit) and 2-digit (8-bit) per-channel hex values.
For 16-bit values, the high byte is used (e.g. RRRR → RR).