RoslynPad.Themes
5.0.0
Prefix Reserved
dotnet add package RoslynPad.Themes --version 5.0.0
NuGet\Install-Package RoslynPad.Themes -Version 5.0.0
<PackageReference Include="RoslynPad.Themes" Version="5.0.0" />
<PackageVersion Include="RoslynPad.Themes" Version="5.0.0" />
<PackageReference Include="RoslynPad.Themes" />
paket add RoslynPad.Themes --version 5.0.0
#r "nuget: RoslynPad.Themes, 5.0.0"
#:package RoslynPad.Themes@5.0.0
#addin nuget:?package=RoslynPad.Themes&version=5.0.0
#tool nuget:?package=RoslynPad.Themes&version=5.0.0
RoslynPad.Themes
A .NET port of the Visual Studio Code theme reader. Parses VS Code JSON theme files into a Theme object that can be used for syntax highlighting.
The VS Code default themes (dark and light) are embedded in the assembly.
Key Types
VsCodeThemeReader
Reads and resolves VS Code theme files, including inheritance chains.
IThemeReader reader = new VsCodeThemeReader();
Theme theme = await reader.ReadThemeAsync("path/to/theme.json", ThemeType.Dark);
Theme
Represents a parsed color theme.
// Look up a token color by TextMate scope
var settings = theme.TryGetScopeSettings("keyword.control");
if (settings.HasValue)
{
string? foreground = settings.Value.Value.Foreground; // e.g. "#569CD6"
string? fontStyle = settings.Value.Value.FontStyle; // e.g. "bold"
}
// Look up a UI color
string? editorBg = theme.TryGetColor("editor.background");
Properties: Name, Type (Light/Dark), TokenColors, Colors
IColorRegistry
Implement to provide default color resolution for theme color references.
string? color = registry.ResolveDefaultColor("editor.foreground", theme);
Integration with RoslynPad.Editor
Use ThemeClassificationColors from the Editor packages to apply a theme to the code editor:
var colors = new ThemeClassificationColors(theme);
await editor.InitializeAsync(host, colors, workingDirectory, "", SourceCodeKind.Script);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on RoslynPad.Themes:
| Package | Downloads |
|---|---|
|
RoslynPad.Editor.Windows
Provides a Roslyn-based code editor using AvalonEdit (WPF platform) with completion, diagnostics, and quick actions |
|
|
RoslynPad.Editor.Avalonia
Provides a Roslyn-based code editor using AvaloniaEdit (Avalonia platform) with completion, diagnostics, and quick actions |
GitHub repositories
This package is not used by any popular GitHub repositories.