主题色

小于 1 分钟界面界面主题色

主题允许你自定义主题颜色,甚至提供选择器。

设置默认主题色

你应该在 .vuepress/styles/palette.scss 中设置站点的默认主题颜色:

$theme-color: #f00;

主题色选择器

你需要按照 { 颜色名1: 颜色值, 颜色名2: 颜色值, ... } 的格式在主题选项中配置 themeColor:

第一个颜色应为上方设置的默认主题色。

例子
// .vuepress/config.ts
import { defineUserConfig } from "vuepress";
import { hopeTheme } from "vuepress-theme-hope";

export default defineUserConfig({
  theme: hopeTheme({
    themeColor: {
      blue: "#2196f3",
      red: "#f26d6d",
      green: "#3eaf7c",
      orange: "#fb9b5f",
    },
  }),
});






 
 
 
 
 
 


尝试