import { RunOnceScheduler } from "../../../base/common/async.mjs";
import { Color, RGBA } from "../../../base/common/color.mjs";
import { Emitter } from "../../../base/common/event.mjs";
import { assertNever } from "../../../base/common/types.mjs";
import { localize } from "../../../nls.mjs";
import { Extensions as Extensions$1 } from "../../jsonschemas/common/jsonContributionRegistry.mjs";
import { Registry } from "../../registry/common/platform.mjs";
function asCssVariableName(colorIdent) {
  return `--vscode-${colorIdent.replace(/\./g, "-")}`;
}
const Extensions = {
  ColorContribution: "base.contributions.colors"
};
class ColorRegistry {
  constructor() {
    this._onDidChangeSchema = new Emitter();
    this.onDidChangeSchema = this._onDidChangeSchema.event;
    this.colorSchema = { type: "object", properties: {} };
    this.colorReferenceSchema = { type: "string", enum: [], enumDescriptions: [] };
    this.colorsById = {};
  }
  registerColor(id, defaults, description, needsTransparency = false, deprecationMessage) {
    let colorContribution = { id, description, defaults, needsTransparency, deprecationMessage };
    this.colorsById[id] = colorContribution;
    let propertySchema = { type: "string", description, format: "color-hex", defaultSnippets: [{ body: "${1:#ff0000}" }] };
    if (deprecationMessage) {
      propertySchema.deprecationMessage = deprecationMessage;
    }
    this.colorSchema.properties[id] = propertySchema;
    this.colorReferenceSchema.enum.push(id);
    this.colorReferenceSchema.enumDescriptions.push(description);
    this._onDidChangeSchema.fire();
    return id;
  }
  getColors() {
    return Object.keys(this.colorsById).map((id) => this.colorsById[id]);
  }
  resolveDefaultColor(id, theme) {
    const colorDesc = this.colorsById[id];
    if (colorDesc && colorDesc.defaults) {
      const colorValue = colorDesc.defaults[theme.type];
      return resolveColorValue(colorValue, theme);
    }
    return void 0;
  }
  getColorSchema() {
    return this.colorSchema;
  }
  toString() {
    let sorter = (a, b) => {
      let cat1 = a.indexOf(".") === -1 ? 0 : 1;
      let cat2 = b.indexOf(".") === -1 ? 0 : 1;
      if (cat1 !== cat2) {
        return cat1 - cat2;
      }
      return a.localeCompare(b);
    };
    return Object.keys(this.colorsById).sort(sorter).map((k) => `- \`${k}\`: ${this.colorsById[k].description}`).join("\n");
  }
}
const colorRegistry = new ColorRegistry();
Registry.add(Extensions.ColorContribution, colorRegistry);
function registerColor(id, defaults, description, needsTransparency, deprecationMessage) {
  return colorRegistry.registerColor(id, defaults, description, needsTransparency, deprecationMessage);
}
const foreground = registerColor("foreground", { dark: "#CCCCCC", light: "#616161", hc: "#FFFFFF" }, localize("foreground", "Overall foreground color. This color is only used if not overridden by a component."));
const errorForeground = registerColor("errorForeground", { dark: "#F48771", light: "#A1260D", hc: "#F48771" }, localize("errorForeground", "Overall foreground color for error messages. This color is only used if not overridden by a component."));
registerColor("descriptionForeground", { light: "#717171", dark: transparent(foreground, 0.7), hc: transparent(foreground, 0.7) }, localize("descriptionForeground", "Foreground color for description text providing additional information, for example for a label."));
const iconForeground = registerColor("icon.foreground", { dark: "#C5C5C5", light: "#424242", hc: "#FFFFFF" }, localize("iconForeground", "The default color for icons in the workbench."));
const focusBorder = registerColor("focusBorder", { dark: "#007FD4", light: "#0090F1", hc: "#F38518" }, localize("focusBorder", "Overall border color for focused elements. This color is only used if not overridden by a component."));
const contrastBorder = registerColor("contrastBorder", { light: null, dark: null, hc: "#6FC3DF" }, localize("contrastBorder", "An extra border around elements to separate them from others for greater contrast."));
const activeContrastBorder = registerColor("contrastActiveBorder", { light: null, dark: null, hc: focusBorder }, localize("activeContrastBorder", "An extra border around active elements to separate them from others for greater contrast."));
registerColor("selection.background", { light: null, dark: null, hc: null }, localize("selectionBackground", "The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));
registerColor("textSeparator.foreground", { light: "#0000002e", dark: "#ffffff2e", hc: Color.black }, localize("textSeparatorForeground", "Color for text separators."));
const textLinkForeground = registerColor("textLink.foreground", { light: "#006AB1", dark: "#3794FF", hc: "#3794FF" }, localize("textLinkForeground", "Foreground color for links in text."));
const textLinkActiveForeground = registerColor("textLink.activeForeground", { light: "#006AB1", dark: "#3794FF", hc: "#3794FF" }, localize("textLinkActiveForeground", "Foreground color for links in text when clicked on and on mouse hover."));
registerColor("textPreformat.foreground", { light: "#A31515", dark: "#D7BA7D", hc: "#D7BA7D" }, localize("textPreformatForeground", "Foreground color for preformatted text segments."));
registerColor("textBlockQuote.background", { light: "#7f7f7f1a", dark: "#7f7f7f1a", hc: null }, localize("textBlockQuoteBackground", "Background color for block quotes in text."));
registerColor("textBlockQuote.border", { light: "#007acc80", dark: "#007acc80", hc: Color.white }, localize("textBlockQuoteBorder", "Border color for block quotes in text."));
const textCodeBlockBackground = registerColor("textCodeBlock.background", { light: "#dcdcdc66", dark: "#0a0a0a66", hc: Color.black }, localize("textCodeBlockBackground", "Background color for code blocks in text."));
const widgetShadow = registerColor("widget.shadow", { dark: transparent(Color.black, 0.36), light: transparent(Color.black, 0.16), hc: null }, localize("widgetShadow", "Shadow color of widgets such as find/replace inside the editor."));
const inputBackground = registerColor("input.background", { dark: "#3C3C3C", light: Color.white, hc: Color.black }, localize("inputBoxBackground", "Input box background."));
const inputForeground = registerColor("input.foreground", { dark: foreground, light: foreground, hc: foreground }, localize("inputBoxForeground", "Input box foreground."));
const inputBorder = registerColor("input.border", { dark: null, light: null, hc: contrastBorder }, localize("inputBoxBorder", "Input box border."));
const inputActiveOptionBorder = registerColor("inputOption.activeBorder", { dark: "#007ACC00", light: "#007ACC00", hc: contrastBorder }, localize("inputBoxActiveOptionBorder", "Border color of activated options in input fields."));
registerColor("inputOption.hoverBackground", { dark: "#5a5d5e80", light: "#b8b8b850", hc: null }, localize("inputOption.hoverBackground", "Background color of activated options in input fields."));
const inputActiveOptionBackground = registerColor("inputOption.activeBackground", { dark: transparent(focusBorder, 0.4), light: transparent(focusBorder, 0.2), hc: Color.transparent }, localize("inputOption.activeBackground", "Background hover color of options in input fields."));
const inputActiveOptionForeground = registerColor("inputOption.activeForeground", { dark: Color.white, light: Color.black, hc: null }, localize("inputOption.activeForeground", "Foreground color of activated options in input fields."));
registerColor("input.placeholderForeground", { light: transparent(foreground, 0.5), dark: transparent(foreground, 0.5), hc: transparent(foreground, 0.7) }, localize("inputPlaceholderForeground", "Input box foreground color for placeholder text."));
const inputValidationInfoBackground = registerColor("inputValidation.infoBackground", { dark: "#063B49", light: "#D6ECF2", hc: Color.black }, localize("inputValidationInfoBackground", "Input validation background color for information severity."));
const inputValidationInfoForeground = registerColor("inputValidation.infoForeground", { dark: null, light: null, hc: null }, localize("inputValidationInfoForeground", "Input validation foreground color for information severity."));
const inputValidationInfoBorder = registerColor("inputValidation.infoBorder", { dark: "#007acc", light: "#007acc", hc: contrastBorder }, localize("inputValidationInfoBorder", "Input validation border color for information severity."));
const inputValidationWarningBackground = registerColor("inputValidation.warningBackground", { dark: "#352A05", light: "#F6F5D2", hc: Color.black }, localize("inputValidationWarningBackground", "Input validation background color for warning severity."));
const inputValidationWarningForeground = registerColor("inputValidation.warningForeground", { dark: null, light: null, hc: null }, localize("inputValidationWarningForeground", "Input validation foreground color for warning severity."));
const inputValidationWarningBorder = registerColor("inputValidation.warningBorder", { dark: "#B89500", light: "#B89500", hc: contrastBorder }, localize("inputValidationWarningBorder", "Input validation border color for warning severity."));
const inputValidationErrorBackground = registerColor("inputValidation.errorBackground", { dark: "#5A1D1D", light: "#F2DEDE", hc: Color.black }, localize("inputValidationErrorBackground", "Input validation background color for error severity."));
const inputValidationErrorForeground = registerColor("inputValidation.errorForeground", { dark: null, light: null, hc: null }, localize("inputValidationErrorForeground", "Input validation foreground color for error severity."));
const inputValidationErrorBorder = registerColor("inputValidation.errorBorder", { dark: "#BE1100", light: "#BE1100", hc: contrastBorder }, localize("inputValidationErrorBorder", "Input validation border color for error severity."));
const selectBackground = registerColor("dropdown.background", { dark: "#3C3C3C", light: Color.white, hc: Color.black }, localize("dropdownBackground", "Dropdown background."));
registerColor("dropdown.listBackground", { dark: null, light: null, hc: Color.black }, localize("dropdownListBackground", "Dropdown list background."));
const selectForeground = registerColor("dropdown.foreground", { dark: "#F0F0F0", light: null, hc: Color.white }, localize("dropdownForeground", "Dropdown foreground."));
const selectBorder = registerColor("dropdown.border", { dark: selectBackground, light: "#CECECE", hc: contrastBorder }, localize("dropdownBorder", "Dropdown border."));
registerColor("checkbox.background", { dark: selectBackground, light: selectBackground, hc: selectBackground }, localize("checkbox.background", "Background color of checkbox widget."));
registerColor("checkbox.foreground", { dark: selectForeground, light: selectForeground, hc: selectForeground }, localize("checkbox.foreground", "Foreground color of checkbox widget."));
registerColor("checkbox.border", { dark: selectBorder, light: selectBorder, hc: selectBorder }, localize("checkbox.border", "Border color of checkbox widget."));
const buttonForeground = registerColor("button.foreground", { dark: Color.white, light: Color.white, hc: Color.white }, localize("buttonForeground", "Button foreground color."));
const buttonBackground = registerColor("button.background", { dark: "#0E639C", light: "#007ACC", hc: null }, localize("buttonBackground", "Button background color."));
const buttonHoverBackground = registerColor("button.hoverBackground", { dark: lighten(buttonBackground, 0.2), light: darken(buttonBackground, 0.2), hc: null }, localize("buttonHoverBackground", "Button background color when hovering."));
registerColor("button.border", { dark: contrastBorder, light: contrastBorder, hc: contrastBorder }, localize("buttonBorder", "Button border color."));
registerColor("button.secondaryForeground", { dark: Color.white, light: Color.white, hc: Color.white }, localize("buttonSecondaryForeground", "Secondary button foreground color."));
const buttonSecondaryBackground = registerColor("button.secondaryBackground", { dark: "#3A3D41", light: "#5F6A79", hc: null }, localize("buttonSecondaryBackground", "Secondary button background color."));
registerColor("button.secondaryHoverBackground", { dark: lighten(buttonSecondaryBackground, 0.2), light: darken(buttonSecondaryBackground, 0.2), hc: null }, localize("buttonSecondaryHoverBackground", "Secondary button background color when hovering."));
const badgeBackground = registerColor("badge.background", { dark: "#4D4D4D", light: "#C4C4C4", hc: Color.black }, localize("badgeBackground", "Badge background color. Badges are small information labels, e.g. for search results count."));
const badgeForeground = registerColor("badge.foreground", { dark: Color.white, light: "#333", hc: Color.white }, localize("badgeForeground", "Badge foreground color. Badges are small information labels, e.g. for search results count."));
const scrollbarShadow = registerColor("scrollbar.shadow", { dark: "#000000", light: "#DDDDDD", hc: null }, localize("scrollbarShadow", "Scrollbar shadow to indicate that the view is scrolled."));
const scrollbarSliderBackground = registerColor("scrollbarSlider.background", { dark: Color.fromHex("#797979").transparent(0.4), light: Color.fromHex("#646464").transparent(0.4), hc: transparent(contrastBorder, 0.6) }, localize("scrollbarSliderBackground", "Scrollbar slider background color."));
const scrollbarSliderHoverBackground = registerColor("scrollbarSlider.hoverBackground", { dark: Color.fromHex("#646464").transparent(0.7), light: Color.fromHex("#646464").transparent(0.7), hc: transparent(contrastBorder, 0.8) }, localize("scrollbarSliderHoverBackground", "Scrollbar slider background color when hovering."));
const scrollbarSliderActiveBackground = registerColor("scrollbarSlider.activeBackground", { dark: Color.fromHex("#BFBFBF").transparent(0.4), light: Color.fromHex("#000000").transparent(0.6), hc: contrastBorder }, localize("scrollbarSliderActiveBackground", "Scrollbar slider background color when clicked on."));
const progressBarBackground = registerColor("progressBar.background", { dark: Color.fromHex("#0E70C0"), light: Color.fromHex("#0E70C0"), hc: contrastBorder }, localize("progressBarBackground", "Background color of the progress bar that can show for long running operations."));
const editorErrorBackground = registerColor("editorError.background", { dark: null, light: null, hc: null }, localize("editorError.background", "Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."), true);
const editorErrorForeground = registerColor("editorError.foreground", { dark: "#F14C4C", light: "#E51400", hc: null }, localize("editorError.foreground", "Foreground color of error squigglies in the editor."));
const editorErrorBorder = registerColor("editorError.border", { dark: null, light: null, hc: Color.fromHex("#E47777").transparent(0.8) }, localize("errorBorder", "Border color of error boxes in the editor."));
const editorWarningBackground = registerColor("editorWarning.background", { dark: null, light: null, hc: null }, localize("editorWarning.background", "Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."), true);
const editorWarningForeground = registerColor("editorWarning.foreground", { dark: "#CCA700", light: "#BF8803", hc: null }, localize("editorWarning.foreground", "Foreground color of warning squigglies in the editor."));
const editorWarningBorder = registerColor("editorWarning.border", { dark: null, light: null, hc: Color.fromHex("#FFCC00").transparent(0.8) }, localize("warningBorder", "Border color of warning boxes in the editor."));
const editorInfoBackground = registerColor("editorInfo.background", { dark: null, light: null, hc: null }, localize("editorInfo.background", "Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."), true);
const editorInfoForeground = registerColor("editorInfo.foreground", { dark: "#3794FF", light: "#1a85ff", hc: "#3794FF" }, localize("editorInfo.foreground", "Foreground color of info squigglies in the editor."));
const editorInfoBorder = registerColor("editorInfo.border", { dark: null, light: null, hc: Color.fromHex("#3794FF").transparent(0.8) }, localize("infoBorder", "Border color of info boxes in the editor."));
const editorHintForeground = registerColor("editorHint.foreground", { dark: Color.fromHex("#eeeeee").transparent(0.7), light: "#6c6c6c", hc: null }, localize("editorHint.foreground", "Foreground color of hint squigglies in the editor."));
const editorHintBorder = registerColor("editorHint.border", { dark: null, light: null, hc: Color.fromHex("#eeeeee").transparent(0.8) }, localize("hintBorder", "Border color of hint boxes in the editor."));
registerColor("sash.hoverBorder", { dark: focusBorder, light: focusBorder, hc: focusBorder }, localize("sashActiveBorder", "Border color of active sashes."));
const editorBackground = registerColor("editor.background", { light: "#fffffe", dark: "#1E1E1E", hc: Color.black }, localize("editorBackground", "Editor background color."));
const editorForeground = registerColor("editor.foreground", { light: "#333333", dark: "#BBBBBB", hc: Color.white }, localize("editorForeground", "Editor default foreground color."));
const editorWidgetBackground = registerColor("editorWidget.background", { dark: "#252526", light: "#F3F3F3", hc: "#0C141F" }, localize("editorWidgetBackground", "Background color of editor widgets, such as find/replace."));
const editorWidgetForeground = registerColor("editorWidget.foreground", { dark: foreground, light: foreground, hc: foreground }, localize("editorWidgetForeground", "Foreground color of editor widgets, such as find/replace."));
const editorWidgetBorder = registerColor("editorWidget.border", { dark: "#454545", light: "#C8C8C8", hc: contrastBorder }, localize("editorWidgetBorder", "Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget."));
const editorWidgetResizeBorder = registerColor("editorWidget.resizeBorder", { light: null, dark: null, hc: null }, localize("editorWidgetResizeBorder", "Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget."));
const quickInputBackground = registerColor("quickInput.background", { dark: editorWidgetBackground, light: editorWidgetBackground, hc: editorWidgetBackground }, localize("pickerBackground", "Quick picker background color. The quick picker widget is the container for pickers like the command palette."));
const quickInputForeground = registerColor("quickInput.foreground", { dark: editorWidgetForeground, light: editorWidgetForeground, hc: editorWidgetForeground }, localize("pickerForeground", "Quick picker foreground color. The quick picker widget is the container for pickers like the command palette."));
const quickInputTitleBackground = registerColor("quickInputTitle.background", { dark: new Color(new RGBA(255, 255, 255, 0.105)), light: new Color(new RGBA(0, 0, 0, 0.06)), hc: "#000000" }, localize("pickerTitleBackground", "Quick picker title background color. The quick picker widget is the container for pickers like the command palette."));
const pickerGroupForeground = registerColor("pickerGroup.foreground", { dark: "#3794FF", light: "#0066BF", hc: Color.white }, localize("pickerGroupForeground", "Quick picker color for grouping labels."));
const pickerGroupBorder = registerColor("pickerGroup.border", { dark: "#3F3F46", light: "#CCCEDB", hc: Color.white }, localize("pickerGroupBorder", "Quick picker color for grouping borders."));
const keybindingLabelBackground = registerColor("keybindingLabel.background", { dark: new Color(new RGBA(128, 128, 128, 0.17)), light: new Color(new RGBA(221, 221, 221, 0.4)), hc: Color.transparent }, localize("keybindingLabelBackground", "Keybinding label background color. The keybinding label is used to represent a keyboard shortcut."));
const keybindingLabelForeground = registerColor("keybindingLabel.foreground", { dark: Color.fromHex("#CCCCCC"), light: Color.fromHex("#555555"), hc: Color.white }, localize("keybindingLabelForeground", "Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut."));
const keybindingLabelBorder = registerColor("keybindingLabel.border", { dark: new Color(new RGBA(51, 51, 51, 0.6)), light: new Color(new RGBA(204, 204, 204, 0.4)), hc: new Color(new RGBA(111, 195, 223)) }, localize("keybindingLabelBorder", "Keybinding label border color. The keybinding label is used to represent a keyboard shortcut."));
const keybindingLabelBottomBorder = registerColor("keybindingLabel.bottomBorder", { dark: new Color(new RGBA(68, 68, 68, 0.6)), light: new Color(new RGBA(187, 187, 187, 0.4)), hc: new Color(new RGBA(111, 195, 223)) }, localize("keybindingLabelBottomBorder", "Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut."));
const editorSelectionBackground = registerColor("editor.selectionBackground", { light: "#ADD6FF", dark: "#264F78", hc: "#f3f518" }, localize("editorSelectionBackground", "Color of the editor selection."));
const editorSelectionForeground = registerColor("editor.selectionForeground", { light: null, dark: null, hc: "#000000" }, localize("editorSelectionForeground", "Color of the selected text for high contrast."));
const editorInactiveSelection = registerColor("editor.inactiveSelectionBackground", { light: transparent(editorSelectionBackground, 0.5), dark: transparent(editorSelectionBackground, 0.5), hc: transparent(editorSelectionBackground, 0.5) }, localize("editorInactiveSelection", "Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."), true);
const editorSelectionHighlight = registerColor("editor.selectionHighlightBackground", { light: lessProminent(editorSelectionBackground, editorBackground, 0.3, 0.6), dark: lessProminent(editorSelectionBackground, editorBackground, 0.3, 0.6), hc: null }, localize("editorSelectionHighlight", "Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."), true);
const editorSelectionHighlightBorder = registerColor("editor.selectionHighlightBorder", { light: null, dark: null, hc: activeContrastBorder }, localize("editorSelectionHighlightBorder", "Border color for regions with the same content as the selection."));
const editorFindMatch = registerColor("editor.findMatchBackground", { light: "#A8AC94", dark: "#515C6A", hc: null }, localize("editorFindMatch", "Color of the current search match."));
const editorFindMatchHighlight = registerColor("editor.findMatchHighlightBackground", { light: "#EA5C0055", dark: "#EA5C0055", hc: null }, localize("findMatchHighlight", "Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."), true);
const editorFindRangeHighlight = registerColor("editor.findRangeHighlightBackground", { dark: "#3a3d4166", light: "#b4b4b44d", hc: null }, localize("findRangeHighlight", "Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."), true);
const editorFindMatchBorder = registerColor("editor.findMatchBorder", { light: null, dark: null, hc: activeContrastBorder }, localize("editorFindMatchBorder", "Border color of the current search match."));
const editorFindMatchHighlightBorder = registerColor("editor.findMatchHighlightBorder", { light: null, dark: null, hc: activeContrastBorder }, localize("findMatchHighlightBorder", "Border color of the other search matches."));
const editorFindRangeHighlightBorder = registerColor("editor.findRangeHighlightBorder", { dark: null, light: null, hc: transparent(activeContrastBorder, 0.4) }, localize("findRangeHighlightBorder", "Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."), true);
registerColor("searchEditor.findMatchBackground", { light: transparent(editorFindMatchHighlight, 0.66), dark: transparent(editorFindMatchHighlight, 0.66), hc: editorFindMatchHighlight }, localize("searchEditor.queryMatch", "Color of the Search Editor query matches."));
registerColor("searchEditor.findMatchBorder", { light: transparent(editorFindMatchHighlightBorder, 0.66), dark: transparent(editorFindMatchHighlightBorder, 0.66), hc: editorFindMatchHighlightBorder }, localize("searchEditor.editorFindMatchBorder", "Border color of the Search Editor query matches."));
const editorHoverHighlight = registerColor("editor.hoverHighlightBackground", { light: "#ADD6FF26", dark: "#264f7840", hc: "#ADD6FF26" }, localize("hoverHighlight", "Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."), true);
const editorHoverBackground = registerColor("editorHoverWidget.background", { light: editorWidgetBackground, dark: editorWidgetBackground, hc: editorWidgetBackground }, localize("hoverBackground", "Background color of the editor hover."));
const editorHoverForeground = registerColor("editorHoverWidget.foreground", { light: editorWidgetForeground, dark: editorWidgetForeground, hc: editorWidgetForeground }, localize("hoverForeground", "Foreground color of the editor hover."));
const editorHoverBorder = registerColor("editorHoverWidget.border", { light: editorWidgetBorder, dark: editorWidgetBorder, hc: editorWidgetBorder }, localize("hoverBorder", "Border color of the editor hover."));
const editorHoverStatusBarBackground = registerColor("editorHoverWidget.statusBarBackground", { dark: lighten(editorHoverBackground, 0.2), light: darken(editorHoverBackground, 0.05), hc: editorWidgetBackground }, localize("statusBarBackground", "Background color of the editor hover status bar."));
const editorActiveLinkForeground = registerColor("editorLink.activeForeground", { dark: "#4E94CE", light: Color.blue, hc: Color.cyan }, localize("activeLinkForeground", "Color of active links."));
const editorInlayHintForeground = registerColor("editorInlayHint.foreground", { dark: transparent(badgeForeground, 0.8), light: transparent(badgeForeground, 0.8), hc: badgeForeground }, localize("editorInlayHintForeground", "Foreground color of inline hints"));
const editorInlayHintBackground = registerColor("editorInlayHint.background", { dark: transparent(badgeBackground, 0.6), light: transparent(badgeBackground, 0.3), hc: badgeBackground }, localize("editorInlayHintBackground", "Background color of inline hints"));
const editorInlayHintTypeForeground = registerColor("editorInlayHint.typeForeground", { dark: editorInlayHintForeground, light: editorInlayHintForeground, hc: editorInlayHintForeground }, localize("editorInlayHintForegroundTypes", "Foreground color of inline hints for types"));
const editorInlayHintTypeBackground = registerColor("editorInlayHint.typeBackground", { dark: editorInlayHintBackground, light: editorInlayHintBackground, hc: editorInlayHintBackground }, localize("editorInlayHintBackgroundTypes", "Background color of inline hints for types"));
const editorInlayHintParameterForeground = registerColor("editorInlayHint.parameterForeground", { dark: editorInlayHintForeground, light: editorInlayHintForeground, hc: editorInlayHintForeground }, localize("editorInlayHintForegroundParameter", "Foreground color of inline hints for parameters"));
const editorInlayHintParameterBackground = registerColor("editorInlayHint.parameterBackground", { dark: editorInlayHintBackground, light: editorInlayHintBackground, hc: editorInlayHintBackground }, localize("editorInlayHintBackgroundParameter", "Background color of inline hints for parameters"));
const editorLightBulbForeground = registerColor("editorLightBulb.foreground", { dark: "#FFCC00", light: "#DDB100", hc: "#FFCC00" }, localize("editorLightBulbForeground", "The color used for the lightbulb actions icon."));
const editorLightBulbAutoFixForeground = registerColor("editorLightBulbAutoFix.foreground", { dark: "#75BEFF", light: "#007ACC", hc: "#75BEFF" }, localize("editorLightBulbAutoFixForeground", "The color used for the lightbulb auto fix actions icon."));
const defaultInsertColor = new Color(new RGBA(155, 185, 85, 0.2));
const defaultRemoveColor = new Color(new RGBA(255, 0, 0, 0.2));
const diffInserted = registerColor("diffEditor.insertedTextBackground", { dark: defaultInsertColor, light: defaultInsertColor, hc: null }, localize("diffEditorInserted", "Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."), true);
const diffRemoved = registerColor("diffEditor.removedTextBackground", { dark: defaultRemoveColor, light: defaultRemoveColor, hc: null }, localize("diffEditorRemoved", "Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."), true);
const diffInsertedLine = registerColor("diffEditor.insertedLineBackground", { dark: null, light: null, hc: null }, localize("diffEditorInsertedLines", "Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."), true);
const diffRemovedLine = registerColor("diffEditor.removedLineBackground", { dark: null, light: null, hc: null }, localize("diffEditorRemovedLines", "Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."), true);
const diffInsertedLineGutter = registerColor("diffEditorGutter.insertedLineBackground", { dark: null, light: null, hc: null }, localize("diffEditorInsertedLineGutter", "Background color for the margin where lines got inserted."));
const diffRemovedLineGutter = registerColor("diffEditorGutter.removedLineBackground", { dark: null, light: null, hc: null }, localize("diffEditorRemovedLineGutter", "Background color for the margin where lines got removed."));
const diffOverviewRulerInserted = registerColor("diffEditorOverview.insertedForeground", { dark: null, light: null, hc: null }, localize("diffEditorOverviewInserted", "Diff overview ruler foreground for inserted content."));
const diffOverviewRulerRemoved = registerColor("diffEditorOverview.removedForeground", { dark: null, light: null, hc: null }, localize("diffEditorOverviewRemoved", "Diff overview ruler foreground for removed content."));
const diffInsertedOutline = registerColor("diffEditor.insertedTextBorder", { dark: null, light: null, hc: "#33ff2eff" }, localize("diffEditorInsertedOutline", "Outline color for the text that got inserted."));
const diffRemovedOutline = registerColor("diffEditor.removedTextBorder", { dark: null, light: null, hc: "#FF008F" }, localize("diffEditorRemovedOutline", "Outline color for text that got removed."));
const diffBorder = registerColor("diffEditor.border", { dark: null, light: null, hc: contrastBorder }, localize("diffEditorBorder", "Border color between the two text editors."));
const diffDiagonalFill = registerColor("diffEditor.diagonalFill", { dark: "#cccccc33", light: "#22222233", hc: null }, localize("diffDiagonalFill", "Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views."));
const listFocusBackground = registerColor("list.focusBackground", { dark: null, light: null, hc: null }, localize("listFocusBackground", "List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."));
const listFocusForeground = registerColor("list.focusForeground", { dark: null, light: null, hc: null }, localize("listFocusForeground", "List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."));
const listFocusOutline = registerColor("list.focusOutline", { dark: focusBorder, light: focusBorder, hc: activeContrastBorder }, localize("listFocusOutline", "List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."));
const listActiveSelectionBackground = registerColor("list.activeSelectionBackground", { dark: "#094771", light: "#0060C0", hc: null }, localize("listActiveSelectionBackground", "List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."));
const listActiveSelectionForeground = registerColor("list.activeSelectionForeground", { dark: Color.white, light: Color.white, hc: null }, localize("listActiveSelectionForeground", "List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."));
const listActiveSelectionIconForeground = registerColor("list.activeSelectionIconForeground", { dark: null, light: null, hc: null }, localize("listActiveSelectionIconForeground", "List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."));
const listInactiveSelectionBackground = registerColor("list.inactiveSelectionBackground", { dark: "#37373D", light: "#E4E6F1", hc: null }, localize("listInactiveSelectionBackground", "List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not."));
const listInactiveSelectionForeground = registerColor("list.inactiveSelectionForeground", { dark: null, light: null, hc: null }, localize("listInactiveSelectionForeground", "List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not."));
const listInactiveSelectionIconForeground = registerColor("list.inactiveSelectionIconForeground", { dark: null, light: null, hc: null }, localize("listInactiveSelectionIconForeground", "List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not."));
const listInactiveFocusBackground = registerColor("list.inactiveFocusBackground", { dark: null, light: null, hc: null }, localize("listInactiveFocusBackground", "List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not."));
const listInactiveFocusOutline = registerColor("list.inactiveFocusOutline", { dark: null, light: null, hc: null }, localize("listInactiveFocusOutline", "List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not."));
const listHoverBackground = registerColor("list.hoverBackground", { dark: "#2A2D2E", light: "#F0F0F0", hc: null }, localize("listHoverBackground", "List/Tree background when hovering over items using the mouse."));
const listHoverForeground = registerColor("list.hoverForeground", { dark: null, light: null, hc: null }, localize("listHoverForeground", "List/Tree foreground when hovering over items using the mouse."));
const listDropBackground = registerColor("list.dropBackground", { dark: "#062F4A", light: "#D6EBFF", hc: null }, localize("listDropBackground", "List/Tree drag and drop background when moving items around using the mouse."));
const listHighlightForeground = registerColor("list.highlightForeground", { dark: "#18A3FF", light: "#0066BF", hc: focusBorder }, localize("highlight", "List/Tree foreground color of the match highlights when searching inside the list/tree."));
const listFocusHighlightForeground = registerColor("list.focusHighlightForeground", { dark: listHighlightForeground, light: ifDefinedThenElse(listActiveSelectionBackground, listHighlightForeground, "#9DDDFF"), hc: listHighlightForeground }, localize("listFocusHighlightForeground", "List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));
registerColor("list.invalidItemForeground", { dark: "#B89500", light: "#B89500", hc: "#B89500" }, localize("invalidItemForeground", "List/Tree foreground color for invalid items, for example an unresolved root in explorer."));
registerColor("list.errorForeground", { dark: "#F88070", light: "#B01011", hc: null }, localize("listErrorForeground", "Foreground color of list items containing errors."));
registerColor("list.warningForeground", { dark: "#CCA700", light: "#855F00", hc: null }, localize("listWarningForeground", "Foreground color of list items containing warnings."));
const listFilterWidgetBackground = registerColor("listFilterWidget.background", { light: "#efc1ad", dark: "#653723", hc: Color.black }, localize("listFilterWidgetBackground", "Background color of the type filter widget in lists and trees."));
const listFilterWidgetOutline = registerColor("listFilterWidget.outline", { dark: Color.transparent, light: Color.transparent, hc: "#f38518" }, localize("listFilterWidgetOutline", "Outline color of the type filter widget in lists and trees."));
const listFilterWidgetNoMatchesOutline = registerColor("listFilterWidget.noMatchesOutline", { dark: "#BE1100", light: "#BE1100", hc: contrastBorder }, localize("listFilterWidgetNoMatchesOutline", "Outline color of the type filter widget in lists and trees, when there are no matches."));
registerColor("list.filterMatchBackground", { dark: editorFindMatchHighlight, light: editorFindMatchHighlight, hc: null }, localize("listFilterMatchHighlight", "Background color of the filtered match."));
registerColor("list.filterMatchBorder", { dark: editorFindMatchHighlightBorder, light: editorFindMatchHighlightBorder, hc: contrastBorder }, localize("listFilterMatchHighlightBorder", "Border color of the filtered match."));
const treeIndentGuidesStroke = registerColor("tree.indentGuidesStroke", { dark: "#585858", light: "#a9a9a9", hc: "#a9a9a9" }, localize("treeIndentGuidesStroke", "Tree stroke color for the indentation guides."));
const tableColumnsBorder = registerColor("tree.tableColumnsBorder", { dark: "#CCCCCC20", light: "#61616120", hc: null }, localize("tableColumnsBorder", "Table border color between columns."));
const tableOddRowsBackgroundColor = registerColor("tree.tableOddRowsBackground", { dark: transparent(foreground, 0.04), light: transparent(foreground, 0.04), hc: null }, localize("tableOddRowsBackgroundColor", "Background color for odd table rows."));
registerColor("list.deemphasizedForeground", { dark: "#8C8C8C", light: "#8E8E90", hc: "#A7A8A9" }, localize("listDeemphasizedForeground", "List/Tree foreground color for items that are deemphasized. "));
const _deprecatedQuickInputListFocusBackground = registerColor("quickInput.list.focusBackground", { dark: null, light: null, hc: null }, "", void 0, localize("quickInput.list.focusBackground deprecation", "Please use quickInputList.focusBackground instead"));
const quickInputListFocusForeground = registerColor("quickInputList.focusForeground", { dark: listActiveSelectionForeground, light: listActiveSelectionForeground, hc: listActiveSelectionForeground }, localize("quickInput.listFocusForeground", "Quick picker foreground color for the focused item."));
const quickInputListFocusIconForeground = registerColor("quickInputList.focusIconForeground", { dark: listActiveSelectionIconForeground, light: listActiveSelectionIconForeground, hc: listActiveSelectionIconForeground }, localize("quickInput.listFocusIconForeground", "Quick picker icon foreground color for the focused item."));
const quickInputListFocusBackground = registerColor("quickInputList.focusBackground", { dark: oneOf(_deprecatedQuickInputListFocusBackground, listActiveSelectionBackground), light: oneOf(_deprecatedQuickInputListFocusBackground, listActiveSelectionBackground), hc: null }, localize("quickInput.listFocusBackground", "Quick picker background color for the focused item."));
const menuBorder = registerColor("menu.border", { dark: null, light: null, hc: contrastBorder }, localize("menuBorder", "Border color of menus."));
const menuForeground = registerColor("menu.foreground", { dark: selectForeground, light: foreground, hc: selectForeground }, localize("menuForeground", "Foreground color of menu items."));
const menuBackground = registerColor("menu.background", { dark: selectBackground, light: selectBackground, hc: selectBackground }, localize("menuBackground", "Background color of menu items."));
const menuSelectionForeground = registerColor("menu.selectionForeground", { dark: listActiveSelectionForeground, light: listActiveSelectionForeground, hc: listActiveSelectionForeground }, localize("menuSelectionForeground", "Foreground color of the selected menu item in menus."));
const menuSelectionBackground = registerColor("menu.selectionBackground", { dark: listActiveSelectionBackground, light: listActiveSelectionBackground, hc: listActiveSelectionBackground }, localize("menuSelectionBackground", "Background color of the selected menu item in menus."));
const menuSelectionBorder = registerColor("menu.selectionBorder", { dark: null, light: null, hc: activeContrastBorder }, localize("menuSelectionBorder", "Border color of the selected menu item in menus."));
const menuSeparatorBackground = registerColor("menu.separatorBackground", { dark: "#BBBBBB", light: "#888888", hc: contrastBorder }, localize("menuSeparatorBackground", "Color of a separator menu item in menus."));
const toolbarHoverBackground = registerColor("toolbar.hoverBackground", { dark: "#5a5d5e50", light: "#b8b8b850", hc: null }, localize("toolbarHoverBackground", "Toolbar background when hovering over actions using the mouse"));
registerColor("toolbar.hoverOutline", { dark: null, light: null, hc: activeContrastBorder }, localize("toolbarHoverOutline", "Toolbar outline when hovering over actions using the mouse"));
registerColor("toolbar.activeBackground", { dark: lighten(toolbarHoverBackground, 0.1), light: darken(toolbarHoverBackground, 0.1), hc: null }, localize("toolbarActiveBackground", "Toolbar background when holding the mouse over actions"));
registerColor("editor.snippetTabstopHighlightBackground", { dark: new Color(new RGBA(124, 124, 124, 0.3)), light: new Color(new RGBA(10, 50, 100, 0.2)), hc: new Color(new RGBA(124, 124, 124, 0.3)) }, localize("snippetTabstopHighlightBackground", "Highlight background color of a snippet tabstop."));
registerColor("editor.snippetTabstopHighlightBorder", { dark: null, light: null, hc: null }, localize("snippetTabstopHighlightBorder", "Highlight border color of a snippet tabstop."));
registerColor("editor.snippetFinalTabstopHighlightBackground", { dark: null, light: null, hc: null }, localize("snippetFinalTabstopHighlightBackground", "Highlight background color of the final tabstop of a snippet."));
registerColor("editor.snippetFinalTabstopHighlightBorder", { dark: "#525252", light: new Color(new RGBA(10, 50, 100, 0.5)), hc: "#525252" }, localize("snippetFinalTabstopHighlightBorder", "Highlight border color of the final tabstop of a snippet."));
registerColor("breadcrumb.foreground", { light: transparent(foreground, 0.8), dark: transparent(foreground, 0.8), hc: transparent(foreground, 0.8) }, localize("breadcrumbsFocusForeground", "Color of focused breadcrumb items."));
registerColor("breadcrumb.background", { light: editorBackground, dark: editorBackground, hc: editorBackground }, localize("breadcrumbsBackground", "Background color of breadcrumb items."));
registerColor("breadcrumb.focusForeground", { light: darken(foreground, 0.2), dark: lighten(foreground, 0.1), hc: lighten(foreground, 0.1) }, localize("breadcrumbsFocusForeground", "Color of focused breadcrumb items."));
registerColor("breadcrumb.activeSelectionForeground", { light: darken(foreground, 0.2), dark: lighten(foreground, 0.1), hc: lighten(foreground, 0.1) }, localize("breadcrumbsSelectedForegound", "Color of selected breadcrumb items."));
registerColor("breadcrumbPicker.background", { light: editorWidgetBackground, dark: editorWidgetBackground, hc: editorWidgetBackground }, localize("breadcrumbsSelectedBackground", "Background color of breadcrumb item picker."));
const headerTransparency = 0.5;
const currentBaseColor = Color.fromHex("#40C8AE").transparent(headerTransparency);
const incomingBaseColor = Color.fromHex("#40A6FF").transparent(headerTransparency);
const commonBaseColor = Color.fromHex("#606060").transparent(0.4);
const contentTransparency = 0.4;
const rulerTransparency = 1;
const mergeCurrentHeaderBackground = registerColor("merge.currentHeaderBackground", { dark: currentBaseColor, light: currentBaseColor, hc: null }, localize("mergeCurrentHeaderBackground", "Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."), true);
registerColor("merge.currentContentBackground", { dark: transparent(mergeCurrentHeaderBackground, contentTransparency), light: transparent(mergeCurrentHeaderBackground, contentTransparency), hc: transparent(mergeCurrentHeaderBackground, contentTransparency) }, localize("mergeCurrentContentBackground", "Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."), true);
const mergeIncomingHeaderBackground = registerColor("merge.incomingHeaderBackground", { dark: incomingBaseColor, light: incomingBaseColor, hc: null }, localize("mergeIncomingHeaderBackground", "Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."), true);
registerColor("merge.incomingContentBackground", { dark: transparent(mergeIncomingHeaderBackground, contentTransparency), light: transparent(mergeIncomingHeaderBackground, contentTransparency), hc: transparent(mergeIncomingHeaderBackground, contentTransparency) }, localize("mergeIncomingContentBackground", "Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."), true);
const mergeCommonHeaderBackground = registerColor("merge.commonHeaderBackground", { dark: commonBaseColor, light: commonBaseColor, hc: null }, localize("mergeCommonHeaderBackground", "Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."), true);
registerColor("merge.commonContentBackground", { dark: transparent(mergeCommonHeaderBackground, contentTransparency), light: transparent(mergeCommonHeaderBackground, contentTransparency), hc: transparent(mergeCommonHeaderBackground, contentTransparency) }, localize("mergeCommonContentBackground", "Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."), true);
const mergeBorder = registerColor("merge.border", { dark: null, light: null, hc: "#C3DF6F" }, localize("mergeBorder", "Border color on headers and the splitter in inline merge-conflicts."));
registerColor("editorOverviewRuler.currentContentForeground", { dark: transparent(mergeCurrentHeaderBackground, rulerTransparency), light: transparent(mergeCurrentHeaderBackground, rulerTransparency), hc: mergeBorder }, localize("overviewRulerCurrentContentForeground", "Current overview ruler foreground for inline merge-conflicts."));
registerColor("editorOverviewRuler.incomingContentForeground", { dark: transparent(mergeIncomingHeaderBackground, rulerTransparency), light: transparent(mergeIncomingHeaderBackground, rulerTransparency), hc: mergeBorder }, localize("overviewRulerIncomingContentForeground", "Incoming overview ruler foreground for inline merge-conflicts."));
registerColor("editorOverviewRuler.commonContentForeground", { dark: transparent(mergeCommonHeaderBackground, rulerTransparency), light: transparent(mergeCommonHeaderBackground, rulerTransparency), hc: mergeBorder }, localize("overviewRulerCommonContentForeground", "Common ancestor overview ruler foreground for inline merge-conflicts."));
const overviewRulerFindMatchForeground = registerColor("editorOverviewRuler.findMatchForeground", { dark: "#d186167e", light: "#d186167e", hc: "#AB5A00" }, localize("overviewRulerFindMatchForeground", "Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."), true);
const overviewRulerSelectionHighlightForeground = registerColor("editorOverviewRuler.selectionHighlightForeground", { dark: "#A0A0A0CC", light: "#A0A0A0CC", hc: "#A0A0A0CC" }, localize("overviewRulerSelectionHighlightForeground", "Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."), true);
const minimapFindMatch = registerColor("minimap.findMatchHighlight", { light: "#d18616", dark: "#d18616", hc: "#AB5A00" }, localize("minimapFindMatchHighlight", "Minimap marker color for find matches."), true);
const minimapSelectionOccurrenceHighlight = registerColor("minimap.selectionOccurrenceHighlight", { light: "#c9c9c9", dark: "#676767", hc: "#ffffff" }, localize("minimapSelectionOccurrenceHighlight", "Minimap marker color for repeating editor selections."), true);
const minimapSelection = registerColor("minimap.selectionHighlight", { light: "#ADD6FF", dark: "#264F78", hc: "#ffffff" }, localize("minimapSelectionHighlight", "Minimap marker color for the editor selection."), true);
const minimapError = registerColor("minimap.errorHighlight", { dark: new Color(new RGBA(255, 18, 18, 0.7)), light: new Color(new RGBA(255, 18, 18, 0.7)), hc: new Color(new RGBA(255, 50, 50, 1)) }, localize("minimapError", "Minimap marker color for errors."));
const minimapWarning = registerColor("minimap.warningHighlight", { dark: editorWarningForeground, light: editorWarningForeground, hc: editorWarningBorder }, localize("overviewRuleWarning", "Minimap marker color for warnings."));
const minimapBackground = registerColor("minimap.background", { dark: null, light: null, hc: null }, localize("minimapBackground", "Minimap background color."));
const minimapForegroundOpacity = registerColor("minimap.foregroundOpacity", { dark: Color.fromHex("#000f"), light: Color.fromHex("#000f"), hc: Color.fromHex("#000f") }, localize("minimapForegroundOpacity", 'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.'));
const minimapSliderBackground = registerColor("minimapSlider.background", { light: transparent(scrollbarSliderBackground, 0.5), dark: transparent(scrollbarSliderBackground, 0.5), hc: transparent(scrollbarSliderBackground, 0.5) }, localize("minimapSliderBackground", "Minimap slider background color."));
const minimapSliderHoverBackground = registerColor("minimapSlider.hoverBackground", { light: transparent(scrollbarSliderHoverBackground, 0.5), dark: transparent(scrollbarSliderHoverBackground, 0.5), hc: transparent(scrollbarSliderHoverBackground, 0.5) }, localize("minimapSliderHoverBackground", "Minimap slider background color when hovering."));
const minimapSliderActiveBackground = registerColor("minimapSlider.activeBackground", { light: transparent(scrollbarSliderActiveBackground, 0.5), dark: transparent(scrollbarSliderActiveBackground, 0.5), hc: transparent(scrollbarSliderActiveBackground, 0.5) }, localize("minimapSliderActiveBackground", "Minimap slider background color when clicked on."));
const problemsErrorIconForeground = registerColor("problemsErrorIcon.foreground", { dark: editorErrorForeground, light: editorErrorForeground, hc: editorErrorForeground }, localize("problemsErrorIconForeground", "The color used for the problems error icon."));
const problemsWarningIconForeground = registerColor("problemsWarningIcon.foreground", { dark: editorWarningForeground, light: editorWarningForeground, hc: editorWarningForeground }, localize("problemsWarningIconForeground", "The color used for the problems warning icon."));
const problemsInfoIconForeground = registerColor("problemsInfoIcon.foreground", { dark: editorInfoForeground, light: editorInfoForeground, hc: editorInfoForeground }, localize("problemsInfoIconForeground", "The color used for the problems info icon."));
registerColor("charts.foreground", { dark: foreground, light: foreground, hc: foreground }, localize("chartsForeground", "The foreground color used in charts."));
registerColor("charts.lines", { dark: transparent(foreground, 0.5), light: transparent(foreground, 0.5), hc: transparent(foreground, 0.5) }, localize("chartsLines", "The color used for horizontal lines in charts."));
registerColor("charts.red", { dark: editorErrorForeground, light: editorErrorForeground, hc: editorErrorForeground }, localize("chartsRed", "The red color used in chart visualizations."));
registerColor("charts.blue", { dark: editorInfoForeground, light: editorInfoForeground, hc: editorInfoForeground }, localize("chartsBlue", "The blue color used in chart visualizations."));
registerColor("charts.yellow", { dark: editorWarningForeground, light: editorWarningForeground, hc: editorWarningForeground }, localize("chartsYellow", "The yellow color used in chart visualizations."));
registerColor("charts.orange", { dark: minimapFindMatch, light: minimapFindMatch, hc: minimapFindMatch }, localize("chartsOrange", "The orange color used in chart visualizations."));
registerColor("charts.green", { dark: "#89D185", light: "#388A34", hc: "#89D185" }, localize("chartsGreen", "The green color used in chart visualizations."));
registerColor("charts.purple", { dark: "#B180D7", light: "#652D90", hc: "#B180D7" }, localize("chartsPurple", "The purple color used in chart visualizations."));
function executeTransform(transform, theme) {
  var _a, _b, _c;
  switch (transform.op) {
    case 0:
      return (_a = resolveColorValue(transform.value, theme)) === null || _a === void 0 ? void 0 : _a.darken(transform.factor);
    case 1:
      return (_b = resolveColorValue(transform.value, theme)) === null || _b === void 0 ? void 0 : _b.lighten(transform.factor);
    case 2:
      return (_c = resolveColorValue(transform.value, theme)) === null || _c === void 0 ? void 0 : _c.transparent(transform.factor);
    case 3:
      for (const candidate of transform.values) {
        const color = resolveColorValue(candidate, theme);
        if (color) {
          return color;
        }
      }
      return void 0;
    case 5:
      return resolveColorValue(theme.defines(transform.if) ? transform.then : transform.else, theme);
    case 4: {
      const from = resolveColorValue(transform.value, theme);
      if (!from) {
        return void 0;
      }
      const backgroundColor = resolveColorValue(transform.background, theme);
      if (!backgroundColor) {
        return from.transparent(transform.factor * transform.transparency);
      }
      return from.isDarkerThan(backgroundColor) ? Color.getLighterColor(from, backgroundColor, transform.factor).transparent(transform.transparency) : Color.getDarkerColor(from, backgroundColor, transform.factor).transparent(transform.transparency);
    }
    default:
      throw assertNever();
  }
}
function darken(colorValue, factor) {
  return { op: 0, value: colorValue, factor };
}
function lighten(colorValue, factor) {
  return { op: 1, value: colorValue, factor };
}
function transparent(colorValue, factor) {
  return { op: 2, value: colorValue, factor };
}
function oneOf(...colorValues) {
  return { op: 3, values: colorValues };
}
function ifDefinedThenElse(ifArg, thenArg, elseArg) {
  return { op: 5, if: ifArg, then: thenArg, else: elseArg };
}
function lessProminent(colorValue, backgroundColorValue, factor, transparency) {
  return { op: 4, value: colorValue, background: backgroundColorValue, factor, transparency };
}
function resolveColorValue(colorValue, theme) {
  if (colorValue === null) {
    return void 0;
  } else if (typeof colorValue === "string") {
    if (colorValue[0] === "#") {
      return Color.fromHex(colorValue);
    }
    return theme.getColor(colorValue);
  } else if (colorValue instanceof Color) {
    return colorValue;
  } else if (typeof colorValue === "object") {
    return executeTransform(colorValue, theme);
  }
  return void 0;
}
const workbenchColorsSchemaId = "vscode://schemas/workbench-colors";
let schemaRegistry = Registry.as(Extensions$1.JSONContribution);
schemaRegistry.registerSchema(workbenchColorsSchemaId, colorRegistry.getColorSchema());
const delayer = new RunOnceScheduler(() => schemaRegistry.notifySchemaChanged(workbenchColorsSchemaId), 200);
colorRegistry.onDidChangeSchema(() => {
  if (!delayer.isScheduled()) {
    delayer.schedule();
  }
});
export {
  Extensions,
  _deprecatedQuickInputListFocusBackground,
  activeContrastBorder,
  asCssVariableName,
  badgeBackground,
  badgeForeground,
  buttonBackground,
  buttonForeground,
  buttonHoverBackground,
  buttonSecondaryBackground,
  contrastBorder,
  darken,
  defaultInsertColor,
  defaultRemoveColor,
  diffBorder,
  diffDiagonalFill,
  diffInserted,
  diffInsertedLine,
  diffInsertedLineGutter,
  diffInsertedOutline,
  diffOverviewRulerInserted,
  diffOverviewRulerRemoved,
  diffRemoved,
  diffRemovedLine,
  diffRemovedLineGutter,
  diffRemovedOutline,
  editorActiveLinkForeground,
  editorBackground,
  editorErrorBackground,
  editorErrorBorder,
  editorErrorForeground,
  editorFindMatch,
  editorFindMatchBorder,
  editorFindMatchHighlight,
  editorFindMatchHighlightBorder,
  editorFindRangeHighlight,
  editorFindRangeHighlightBorder,
  editorForeground,
  editorHintBorder,
  editorHintForeground,
  editorHoverBackground,
  editorHoverBorder,
  editorHoverForeground,
  editorHoverHighlight,
  editorHoverStatusBarBackground,
  editorInactiveSelection,
  editorInfoBackground,
  editorInfoBorder,
  editorInfoForeground,
  editorInlayHintBackground,
  editorInlayHintForeground,
  editorInlayHintParameterBackground,
  editorInlayHintParameterForeground,
  editorInlayHintTypeBackground,
  editorInlayHintTypeForeground,
  editorLightBulbAutoFixForeground,
  editorLightBulbForeground,
  editorSelectionBackground,
  editorSelectionForeground,
  editorSelectionHighlight,
  editorSelectionHighlightBorder,
  editorWarningBackground,
  editorWarningBorder,
  editorWarningForeground,
  editorWidgetBackground,
  editorWidgetBorder,
  editorWidgetForeground,
  editorWidgetResizeBorder,
  errorForeground,
  executeTransform,
  focusBorder,
  foreground,
  iconForeground,
  ifDefinedThenElse,
  inputActiveOptionBackground,
  inputActiveOptionBorder,
  inputActiveOptionForeground,
  inputBackground,
  inputBorder,
  inputForeground,
  inputValidationErrorBackground,
  inputValidationErrorBorder,
  inputValidationErrorForeground,
  inputValidationInfoBackground,
  inputValidationInfoBorder,
  inputValidationInfoForeground,
  inputValidationWarningBackground,
  inputValidationWarningBorder,
  inputValidationWarningForeground,
  keybindingLabelBackground,
  keybindingLabelBorder,
  keybindingLabelBottomBorder,
  keybindingLabelForeground,
  lighten,
  listActiveSelectionBackground,
  listActiveSelectionForeground,
  listActiveSelectionIconForeground,
  listDropBackground,
  listFilterWidgetBackground,
  listFilterWidgetNoMatchesOutline,
  listFilterWidgetOutline,
  listFocusBackground,
  listFocusForeground,
  listFocusHighlightForeground,
  listFocusOutline,
  listHighlightForeground,
  listHoverBackground,
  listHoverForeground,
  listInactiveFocusBackground,
  listInactiveFocusOutline,
  listInactiveSelectionBackground,
  listInactiveSelectionForeground,
  listInactiveSelectionIconForeground,
  menuBackground,
  menuBorder,
  menuForeground,
  menuSelectionBackground,
  menuSelectionBorder,
  menuSelectionForeground,
  menuSeparatorBackground,
  mergeBorder,
  mergeCommonHeaderBackground,
  mergeCurrentHeaderBackground,
  mergeIncomingHeaderBackground,
  minimapBackground,
  minimapError,
  minimapFindMatch,
  minimapForegroundOpacity,
  minimapSelection,
  minimapSelectionOccurrenceHighlight,
  minimapSliderActiveBackground,
  minimapSliderBackground,
  minimapSliderHoverBackground,
  minimapWarning,
  oneOf,
  overviewRulerFindMatchForeground,
  overviewRulerSelectionHighlightForeground,
  pickerGroupBorder,
  pickerGroupForeground,
  problemsErrorIconForeground,
  problemsInfoIconForeground,
  problemsWarningIconForeground,
  progressBarBackground,
  quickInputBackground,
  quickInputForeground,
  quickInputListFocusBackground,
  quickInputListFocusForeground,
  quickInputListFocusIconForeground,
  quickInputTitleBackground,
  registerColor,
  resolveColorValue,
  scrollbarShadow,
  scrollbarSliderActiveBackground,
  scrollbarSliderBackground,
  scrollbarSliderHoverBackground,
  selectBackground,
  selectBorder,
  selectForeground,
  tableColumnsBorder,
  tableOddRowsBackgroundColor,
  textCodeBlockBackground,
  textLinkActiveForeground,
  textLinkForeground,
  toolbarHoverBackground,
  transparent,
  treeIndentGuidesStroke,
  widgetShadow,
  workbenchColorsSchemaId
};
