支持猛男粉颜色主题

This commit is contained in:
lutinglt
2025-09-10 23:43:38 +08:00
parent 472647e7c1
commit 89ac2720c7
16 changed files with 191 additions and 28 deletions

View File

@@ -1,4 +1,4 @@
import { defineTheme, type Chroma, type ThemeColor } from "src";
import { defineTheme, themeVars, type Chroma } from "src";
import { github2ThemeColor, type GithubColor } from "src/core/github";
import { prettylights2Chroma, type prettylightsColor } from "src/core/prettylights";
import { darkGithubColors } from "themes/dark";
@@ -28,7 +28,10 @@ export const colorblindDarkGithubColors: GithubColor = {
success: { emphasis: "#1f6feb" },
},
button: {
primary: { fgColor: { rest: "#ffffff" }, bgColor: { hover: "#2a7aef" } },
primary: {
fgColor: { accent: "#58a6ff", rest: "#ffffff" },
bgColor: { rest: themeVars.github.bgColor.success.emphasis, hover: "#2a7aef" },
},
danger: { fgColor: { rest: "#f0883e", hover: "#ffffff" }, bgColor: { hover: "#9b4215" } },
star: darkGithubColors.button.star,
},
@@ -69,7 +72,7 @@ export const colorblindDarkPrettylights: prettylightsColor = {
},
};
export const colorblindDarkColors: ThemeColor = github2ThemeColor(colorblindDarkGithubColors);
export const colorblindDarkColors = github2ThemeColor(colorblindDarkGithubColors);
export const colorblindDarkChroma: Chroma = prettylights2Chroma(colorblindDarkPrettylights);
export default defineTheme(colorblindDarkColors, colorblindDarkChroma);

View File

@@ -1,4 +1,4 @@
import { defineTheme, type Chroma, type ThemeColor } from "src";
import { defineTheme, themeVars, type Chroma } from "src";
import { github2ThemeColor, type GithubColor } from "src/core/github";
import { prettylights2Chroma, type prettylightsColor } from "src/core/prettylights";
import { lightGithubColors } from "themes/light";
@@ -28,7 +28,10 @@ export const colorblindLightGithubColors: GithubColor = {
success: { emphasis: "#0969da" },
},
button: {
primary: { fgColor: { rest: "#ffffff" }, bgColor: { hover: "#0864d1" } },
primary: {
fgColor: { accent: "#0969da", rest: "#ffffff" },
bgColor: { rest: themeVars.github.bgColor.success.emphasis, hover: "#0864d1" },
},
danger: { fgColor: { rest: "#bc4c00", hover: "#ffffff" }, bgColor: { hover: "#bc4c00" } },
star: lightGithubColors.button.star,
},
@@ -69,7 +72,7 @@ export const colorblindLightPrettylights: prettylightsColor = {
},
};
export const colorblindLightColors: ThemeColor = github2ThemeColor(colorblindLightGithubColors);
export const colorblindLightColors = github2ThemeColor(colorblindLightGithubColors);
export const colorblindLightChroma: Chroma = prettylights2Chroma(colorblindLightPrettylights);
export default defineTheme(colorblindLightColors, colorblindLightChroma);

View File

@@ -1,9 +1,10 @@
import { defineTheme, type ThemeColor } from "src";
import { defineTheme, themeVars } from "src";
import { github2ThemeColor, type GithubColor } from "src/core/github";
export const darkGithubColors: GithubColor = {
isDarkTheme: true,
display: {
blue: { fgColor: "#4493f8" },
brown: { fgColor: "#b69a6d" },
cyan: { fgColor: "#07ace4" },
indigo: { fgColor: "#9899ec" },
@@ -56,7 +57,10 @@ export const darkGithubColors: GithubColor = {
translucent: "#ffffff26",
},
button: {
primary: { fgColor: { rest: "#ffffff" }, bgColor: { hover: "#29903b" } },
primary: {
fgColor: { accent: "#3fb950", rest: "#ffffff" },
bgColor: { rest: themeVars.github.bgColor.success.emphasis, hover: "#29903b" },
},
danger: { fgColor: { rest: "#fa5e55", hover: "#ffffff" }, bgColor: { hover: "#b62324" } },
star: { iconColor: "#e3b341" },
},
@@ -75,6 +79,6 @@ export const darkGithubColors: GithubColor = {
},
};
export const darkColors: ThemeColor = github2ThemeColor(darkGithubColors);
export const darkColors = github2ThemeColor(darkGithubColors);
export default defineTheme(darkColors);

View File

@@ -1,9 +1,10 @@
import { defineTheme, type ThemeColor } from "src";
import { defineTheme, themeVars } from "src";
import { github2ThemeColor, type GithubColor } from "src/core/github";
export const lightGithubColors: GithubColor = {
isDarkTheme: false,
display: {
blue: { fgColor: "#0969da" },
brown: { fgColor: "#755f43" },
cyan: { fgColor: "#006a80" },
indigo: { fgColor: "#494edf" },
@@ -56,7 +57,10 @@ export const lightGithubColors: GithubColor = {
translucent: "#1f232826",
},
button: {
primary: { fgColor: { rest: "#ffffff" }, bgColor: { hover: "#1c8139" } },
primary: {
fgColor: { accent: "#1a7f37", rest: "#ffffff" },
bgColor: { rest: themeVars.github.bgColor.success.emphasis, hover: "#1c8139" },
},
danger: { fgColor: { rest: "#d1242f", hover: "#ffffff" }, bgColor: { hover: "#cf222e" } },
star: { iconColor: "#eac54f" },
},
@@ -75,6 +79,6 @@ export const lightGithubColors: GithubColor = {
},
};
export const lightColors: ThemeColor = github2ThemeColor(lightGithubColors);
export const lightColors = github2ThemeColor(lightGithubColors);
export default defineTheme(lightColors);

22
themes/pink-dark.css.ts Normal file
View File

@@ -0,0 +1,22 @@
import { defineTheme } from "src";
import { display2GithubColor, type DisplayColor } from "src/core/display";
import { github2ThemeColor } from "src/core/github";
import { darkGithubColors } from "themes/dark";
export const pinkDarkDisplayColors: DisplayColor = {
num0: "#2d1524",
num1: "#451c35",
num2: "#65244a",
num3: "#842a5d",
num4: "#ac2f74",
num5: "#d34591",
num6: "#e57bb2",
num7: "#ec8dbd",
num8: "#f4a9cd",
num9: "#f9bed9",
};
export const pinkDarkGithubColors = display2GithubColor(pinkDarkDisplayColors, darkGithubColors);
export const pinkDarkColors = github2ThemeColor(pinkDarkGithubColors);
export default defineTheme(pinkDarkColors);

22
themes/pink-light.css.ts Normal file
View File

@@ -0,0 +1,22 @@
import { defineTheme } from "src";
import { display2GithubColor, type DisplayColor } from "src/core/display";
import { github2ThemeColor } from "src/core/github";
import { lightGithubColors } from "themes/light";
export const pinkLightDisplayColors: DisplayColor = {
num0: "#ffe5f1",
num1: "#fdc9e2",
num2: "#f8a5cf",
num3: "#f184bc",
num4: "#e55da5",
num5: "#ce2c85",
num6: "#b12f79",
num7: "#8e2e66",
num8: "#6e2b53",
num9: "#4d233d",
};
export const pinkLightGithubColors = display2GithubColor(pinkLightDisplayColors, lightGithubColors);
export const pinkLightColors = github2ThemeColor(pinkLightGithubColors);
export default defineTheme(pinkLightColors);

View File

@@ -0,0 +1,10 @@
import { defineTheme } from "src";
import { display2GithubColor } from "src/core/display";
import { github2ThemeColor } from "src/core/github";
import { softDarkGithubColors } from "themes/soft-dark";
import { pinkDarkDisplayColors } from "./pink-dark.css";
export const pinkSoftDarkGithubColors = display2GithubColor(pinkDarkDisplayColors, softDarkGithubColors, true);
export const pinkSoftDarkColors = github2ThemeColor(pinkSoftDarkGithubColors);
export default defineTheme(pinkSoftDarkColors);

View File

@@ -1,4 +1,4 @@
import { defineTheme, type Chroma, type ThemeColor } from "src";
import { defineTheme, themeVars, type Chroma } from "src";
import { github2ThemeColor, type GithubColor } from "src/core/github";
import { prettylights2Chroma, type prettylightsColor } from "src/core/prettylights";
import { darkGithubColors } from "themes/dark";
@@ -51,7 +51,10 @@ export const softDarkGithubColors: GithubColor = {
translucent: "#cdd9e526",
},
button: {
primary: { fgColor: { rest: "#ffffff" }, bgColor: { hover: "#3b8640" } },
primary: {
fgColor: { accent: "#57ab5a", rest: "#ffffff" },
bgColor: { rest: themeVars.github.bgColor.success.emphasis, hover: "#3b8640" },
},
danger: { fgColor: { rest: "#ea5c53", hover: "#ffffff" }, bgColor: { hover: "#ad2e2c" } },
star: { iconColor: "#daaa3f" },
},
@@ -100,7 +103,7 @@ export const softDarkPrettylights: prettylightsColor = {
},
};
export const softDarkColors: ThemeColor = github2ThemeColor(softDarkGithubColors);
export const softDarkColors = github2ThemeColor(softDarkGithubColors);
export const softDarkChroma: Chroma = prettylights2Chroma(softDarkPrettylights);
export default defineTheme(softDarkColors, softDarkChroma);

View File

@@ -1,4 +1,4 @@
import { defineTheme, type Chroma, type ThemeColor } from "src";
import { defineTheme, type Chroma } from "src";
import { darkPrettylights } from "src/core/chroma";
import { github2ThemeColor, type GithubColor } from "src/core/github";
import { prettylights2Chroma, type prettylightsColor } from "src/core/prettylights";
@@ -39,7 +39,7 @@ export const tritanopiaDarkPrettylights: prettylightsColor = {
},
};
export const tritanopiaDarkColors: ThemeColor = github2ThemeColor(tritanopiaDarkGithubColors);
export const tritanopiaDarkColors = github2ThemeColor(tritanopiaDarkGithubColors);
export const tritanopiaDarkChroma: Chroma = prettylights2Chroma(tritanopiaDarkPrettylights);
export default defineTheme(tritanopiaDarkColors, tritanopiaDarkChroma);

View File

@@ -1,4 +1,4 @@
import { defineTheme, type Chroma, type ThemeColor } from "src";
import { defineTheme, type Chroma } from "src";
import { lightPrettylights } from "src/core/chroma";
import { github2ThemeColor, type GithubColor } from "src/core/github";
import { prettylights2Chroma, type prettylightsColor } from "src/core/prettylights";
@@ -39,7 +39,7 @@ export const tritanopiaLightPrettylights: prettylightsColor = {
},
};
export const tritanopiaLightColors: ThemeColor = github2ThemeColor(tritanopiaLightGithubColors);
export const tritanopiaLightColors = github2ThemeColor(tritanopiaLightGithubColors);
export const tritanopiaLightChroma: Chroma = prettylights2Chroma(tritanopiaLightPrettylights);
export default defineTheme(tritanopiaLightColors, tritanopiaLightChroma);