theme

GitHub

提供 Material-UI (MUI) 主题系统的深度知识,涵盖深色/浅色调色板、字体排版及 tss-react 样式规范。用于指导正确创建主题、应用配色方案及使用特定样式库,确保视觉设计一致性。

.github/skills/theme/SKILL.md lichtblick-suite/lichtblick

触发场景

需要创建或修改 MUI 主题配置时 询问深色或浅色模式的颜色定义与字体设置时 在组件中实现样式且需遵循 tss-react/mui 规范时

安装

npx skills add lichtblick-suite/lichtblick --skill theme -g -y
更多选项

非标准路径

npx skills add https://github.com/lichtblick-suite/lichtblick/tree/develop/.github/skills/theme -g -y

不安装直接使用

npx skills use lichtblick-suite/lichtblick@theme

指定 Agent (Claude Code)

npx skills add lichtblick-suite/lichtblick --skill theme -a claude-code -g -y

安装 repo 全部 skill

npx skills add lichtblick-suite/lichtblick --all -g -y

预览 repo 内 skill

npx skills add lichtblick-suite/lichtblick --list

SKILL.md

Frontmatter
{
    "name": "theme",
    "description": "Deep theme system knowledge: createMuiTheme factory, dark\/light palette tokens, typography scale, ThemeProvider color-scheme application, and tss-react\/mui styling conventions."
}

Theme Skill

How colors, typography, and the overall visual design are managed via Material-UI (MUI) theming.

Layout

packages/theme/src/
    ├── index.ts            (package entry, re-exports)
    ├── createMuiTheme.ts   (MUI theme factory)
    ├── palette.ts          (dark & light color definitions)
    ├── typography.ts       (font families & sizes)
    └── components/         (MUI component overrides)

Core Files

File Role
packages/theme/src/createMuiTheme.ts Factory that builds the full MUI theme
packages/theme/src/palette.ts Dark and light palette color definitions
packages/theme/src/typography.ts Font families (Inter, IBM Plex Mono) and scale
packages/theme/src/index.ts Package entry, re-exports

Treat palette.ts / typography.ts as the source of truth for exact token values (hex codes, font sizes). Read them directly rather than hardcoding specific values elsewhere.

Color Scheme

Lichtblick supports two schemes: dark (default) and light. Each is defined as a palette object (mode, primary, secondary, error, warning, info, success, background, text, …) in palette.ts.

How a Color Scheme is Applied

  1. User sets a preference (AppConfiguration colorScheme setting)
  2. ThemeProvider reads the preference from context
  3. createMuiTheme(colorScheme) is called with "dark" or "light"
  4. MUI's ThemeProvider wraps the entire app with the resulting theme
function createMuiTheme(colorScheme: "dark" | "light"): Theme {
  const palette = colorScheme === "dark" ? darkPalette : lightPalette;
  return createTheme({ palette, typography, components: { /* MUI overrides */ } });
}

Typography

  • Inter — primary UI font (variable weight)
  • IBM Plex Mono — code/data display (timestamps, topic names, raw messages)

The scale (h1, h2, body1, body2, …) is defined in typography.ts.

Styling Convention (tss-react/mui)

Components are styled with tss-react/muinot @emotion/styled, MUI's styled(), Box, or the sx prop. Styles live in ComponentName.style.ts files.

import { makeStyles } from "tss-react/mui";

const useStyles = makeStyles()((theme) => ({
  root: {
    backgroundColor: theme.palette.background.paper,
    color: theme.palette.text.primary,
    fontFamily: theme.typography.fontFamily,
  },
  highlight: { color: theme.palette.primary.main },
}));

Skills Reference

  • For panel-level colorScheme delivery in RenderState: load panel-extension-api skill

版本历史

  • 6435710 当前 2026-08-16 02:35
  • cab9317 2026-07-24 12:17

同 Skill 集合

.github/skills/3d-rendering/SKILL.md
.github/skills/caching-internals/SKILL.md
.github/skills/deserialization/SKILL.md
.github/skills/e2e-playwright-mcp/SKILL.md
.github/skills/electron-internals/SKILL.md
.github/skills/extensions-internals/SKILL.md
.github/skills/layouts-internals/SKILL.md
.github/skills/mcap-format/SKILL.md
.github/skills/message-path/SKILL.md
.github/skills/message-pipeline/SKILL.md
.github/skills/panel-extension-api/SKILL.md
.github/skills/panel-image/SKILL.md
.github/skills/panel-log/SKILL.md
.github/skills/panel-map/SKILL.md
.github/skills/panel-raw-messages/SKILL.md
.github/skills/panel-state-transitions/SKILL.md
.github/skills/panel-user-scripts/SKILL.md
.github/skills/performance/SKILL.md
.github/skills/player-internals/SKILL.md
.github/skills/plot-internals/SKILL.md
.github/skills/release-process/SKILL.md
.github/skills/remote-caching/SKILL.md
.github/skills/test-conventions/SKILL.md
.github/skills/unit-testing/SKILL.md
.github/skills/web-workers/SKILL.md
.github/skills/websocket-connection/SKILL.md

元信息

文件数
0
版本
832636f
Hash
aee6bd03
收录时间
2026-07-24 12:17

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-10 11:41
浙ICP备14020137号-1 $访客地图$