microsoft/typespec

Public

mirrored from https://github.com/microsoft/typespecAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
6b3bd9a8f15f0a6d61da7fc87494880a0e0d4fed

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

packages/html-program-viewer/src/constants.ts

28lines · modecode

1const variablePrefix = `--tsp-tgv`;
2export const ColorsVariables = {
3 background: `${variablePrefix}-background`,
4 dataKey: `${variablePrefix}-data-key`,
5 indentationGuide: `${variablePrefix}-indentation-guide`,
6 literal: `${variablePrefix}-literal`,
7 property: `${variablePrefix}-property`,
8 ref: `${variablePrefix}-ref`,
9 typeKind: `${variablePrefix}-type-kind`,
10 typeName: `${variablePrefix}-type-name`,
11} as const;
12
13export type ColorVariable = keyof typeof ColorsVariables;
14export type ColorPalette = Record<ColorVariable, string>;
15export const DefaultColors: ColorPalette = {
16 background: "#f3f3f3",
17 dataKey: "#333333",
18 indentationGuide: "#777",
19 literal: "#5da713",
20 property: "#9c5d27",
21 ref: "#268bd2",
22 typeKind: "#7a3e9d",
23 typeName: "#333333",
24};
25
26export const Colors: typeof ColorsVariables = Object.fromEntries(
27 Object.entries(ColorsVariables).map(([k, v]) => [k, `var(${v}, ${(DefaultColors as any)[k]})`])
28) as any;
29