Repository: vscode
Issue: [themes] support sematic colorization for 'excludedCode'
Labels: feature-request,themes

Type: <b>Bug</b>

## Issue Description ##

It's very hard to determine if a code block inside a C# preprocessor directive is compiled or not when using a default theme:

![image](https://github.com/user-attachments/assets/47a7b9d5-46f0-4e83-8cdd-f15d8c301fe1)

## Steps to Reproduce ##

- Enable a default theme like Dark Modern
- Type some C# code inside an undefined preprocessor directive
- Observe the colors

## Expected Behavior ##

Code is dimmed

## Actual Behavior ##

Code isn't dimmed

## Logs ##

https://github.com/user-attachments/assets/996361b2-76b6-42ee-8f87-cf5052cd6f7c

## Remarks ##

- This issue is moved from [vscode-csharp](https://github.com/dotnet/vscode-csharp/issues/7573) because it was reported that it must be resolved by vscode
- Visual Studio 2019 Light and Visual Studio 2019 Dark themes don't have this issue

## Environment information ##

**VSCode version**: 1.93.1
**C# Extension**: 2.45.25
**Using OmniSharp**: false


<details><summary>Dotnet Information</summary>
.NET SDK:
 Version:           8.0.400
 Commit:            36fe6dda56
 Workload version:  8.0.400-manifests.6c274a57
 MSBuild version:   17.11.3+0c8610977

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19045
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\8.0.400\

.NET workloads installed:
Configured to use loose manifests when installing new manifests.
There are no installed workloads to display.

Host:
  Version:      8.0.8
  Architecture: x64
  Commit:       08338fcaa5

.NET SDKs installed:
  8.0.400 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.33 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.33 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 6.0.33 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 8.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download
</details>
<details><summary>Visual Studio Code Extensions</summary>

|Extension|Author|Version|Folder Name|
|---|---|---|---|
|bracket-peek|jomeinaster|1.4.4|jomeinaster.bracket-peek-1.4.4|
|csdevkit|ms-dotnettools|1.10.18|ms-dotnettools.csdevkit-1.10.18-win32-x64|
|csharp|ms-dotnettools|2.45.25|ms-dotnettools.csharp-2.45.25-win32-x64|
|gitlens|eamodio|15.5.1|eamodio.gitlens-15.5.1|
|shaderlabvscodefree|amlovey|1.3.6|amlovey.shaderlabvscodefree-1.3.6|
|unity-toolbox|pixl|100.0.3|pixl.unity-toolbox-100.0.3|
|vscode-dotnet-runtime|ms-dotnettools|2.1.5|ms-dotnettools.vscode-dotnet-runtime-2.1.5|
|vstuc|visualstudiotoolsforunity|1.0.3|visualstudiotoolsforunity.vstuc-1.0.3|;

</details>


VS Code version: Code 1.93.1 (38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40, 2024-09-11T17:20:05.685Z)
OS version: Windows_NT x64 10.0.19045
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz (16 x 2304)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: enabled_on<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled<br>webnn: disabled_off|
|Load (avg)|undefined|
|Memory (System)|31.84GB (18.74GB free)|
|Process Argv|--crash-reporter-id c50731a0-e4b0-451e-8660-05259dfe0822|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (8)</summary>

Extension|Author (truncated)|Version
---|---|---
shaderlabvscodefree|aml|1.3.6
gitlens|eam|15.5.1
bracket-peek|jom|1.4.4
csdevkit|ms-|1.10.18
csharp|ms-|2.45.25
vscode-dotnet-runtime|ms-|2.1.5
unity-toolbox|pix|100.0.3
vstuc|vis|1.0.4


</details>
<!-- generated by issue reporter -->