theme

GitHub

掌握 Material-UI 主题系统,包括深色/浅色调色板、字体比例及 tss-react 样式规范。提供 createMuiTheme 工厂函数用法,指导正确读取 palette 和 typography 配置,避免硬编码颜色值。

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

Trigger Scenarios

需要修改应用颜色或字体配置 使用 MUI 组件进行样式开发 排查主题相关显示问题

Install

npx skills add lichtblick-suite/lichtblick --skill theme -g -y
More Options

Non-standard path

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

Use without installing

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

Version History

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

Same Skill Collection

.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

Metadata

Files
0
Version
6435710
Hash
aee6bd03
Indexed
2026-07-24 12:17

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-17 00:07
浙ICP备14020137号-1 $mapa de visitantes$