theme

GitHub

掌握 Material-UI 主题系统,包括深色/浅色调色板、字体比例及 createMuiTheme 工厂方法。遵循 tss-react/mui 样式规范,禁止使用 sx 或 styled。核心配置以 palette.ts 和 typography.ts 为准。

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

Trigger Scenarios

创建或修改 MUI 主题配置 实现组件的 CSS-in-JS 样式逻辑 查询色值或字体定义

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

  • cab9317 Current 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/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
cab9317
Hash
f4ac3f32
Indexed
2026-07-24 12:17

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-08 06:27
浙ICP备14020137号-1 $Carte des visiteurs$