menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Theia

Eclipse Theia - Cloud & Desktop IDE

Channels
Team

how to change the extension's color with change color theme in theia

April 16, 2020 at 10:09am

how to change the extension's color with change color theme in theia

April 16, 2020 at 10:09am
when I write extension with theia,And when the color theme change, I want the extension's widget color will be changed,how to do?thx

April 17, 2020 at 7:45am
Are they custom colors?
One can contribute new colors by implementing ColorContribution contribution point and calling ColorRegistry.register. It's important that new colors are derived from existing VS Code colors if one plans to allow installation of VS Code extension contributing color themes. Otherwise, there is no guarantee that new colors don't look alien for a random VS Code color theme. One can derive from an existing color, just by plainly referencing it, e.g. dark: 'widget.shadow', or applying transformations, e.g. dark: Color.lighten('widget.shadow', 0.4).
One can though specify values, without deriving from VS Code colors, for new colors in their own theme. See for example, how Light (Theia) theme overrides colors for the activity bar: https://github.com/eclipse-theia/theia/blob/master/packages/monaco/data/monaco-themes/vscode/light_theia.json