TH

Theming System

Manages visual themes in React Native. Supports dynamic light/dark mode and custom palette files.

Install

mkdir -p .claude/skills/theming-system && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10043" && unzip -o skill.zip -d .claude/skills/theming-system && rm skill.zip

Installs to .claude/skills/theming-system

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Theme management with dark mode and custom .pbcolors themes
59 charsno explicit “when” trigger
Beginner

Key capabilities

  • Manage app themes
  • Support dark mode
  • Parse .pbcolors files
  • Style components
  • Detect system theme

How it works

It uses a ThemeContext to provide colors and theme state to components, supporting both light and dark modes.

Inputs & outputs

You give it
Theme preference
You get back
Themed UI

When to use Theming System

  • Implementing dark mode support
  • Applying custom color themes
  • Styling react-native components

About this skill

Theming System

Theme Context

import { useTheme } from '../context/ThemeContext';

function MyComponent() {
  const { colors, isDark, setTheme } = useTheme();

  return (
    <View style={{ backgroundColor: colors.background }}>
      <Text style={{ color: colors.text }}>Hello</Text>
    </View>
  );
}

Color Palette

Color KeyLightDarkUsage
background#FFFFFF#1a1a2eScreen background
card#F5F5F5#2d2d44Cards, modals
text#000000#FFFFFFPrimary text
textSecondary#666666#AAAAAASecondary text
primary#FA6432#FA6432Accent color
border#E0E0E0#404040Borders, separators

Theme Provider Setup

// App.tsx
import { ThemeProvider } from './src/context/ThemeContext';

export default function App() {
  return (
    <ThemeProvider>
      <NavigationContainer>
        <AppNavigator />
      </NavigationContainer>
    </ThemeProvider>
  );
}

Styled Components Pattern

function Card({ children }) {
  const { colors } = useTheme();

  return (
    <View style={[
      styles.card,
      { backgroundColor: colors.card, borderColor: colors.border }
    ]}>
      {children}
    </View>
  );
}

const styles = StyleSheet.create({
  card: {
    borderRadius: 12,
    padding: 16,
    borderWidth: 1,
  },
});

.pbcolors Theme Format

Paperback theme files (.pbcolors) are parsed by themeService.ts:

interface PBColors {
  primary: string;
  background: string;
  card: string;
  text: string;
  // ... other colors
}

// Import custom theme
import { parseThemeFile } from '../services/themeService';

const customTheme = await parseThemeFile(fileUri);
setTheme(customTheme);

System Theme Detection

import { useColorScheme } from 'react-native';

function ThemeProvider({ children }) {
  const systemScheme = useColorScheme(); // 'light' | 'dark'
  const [userPreference, setUserPreference] = useState('system');

  const isDark = userPreference === 'system' 
    ? systemScheme === 'dark'
    : userPreference === 'dark';

  const colors = isDark ? darkColors : lightColors;

  return (
    <ThemeContext.Provider value={{ colors, isDark, setTheme }}>
      {children}
    </ThemeContext.Provider>
  );
}

Status Bar

import { StatusBar } from 'expo-status-bar';

function App() {
  const { isDark } = useTheme();

  return (
    <>
      <StatusBar style={isDark ? 'light' : 'dark'} />
      {/* App content */}
    </>
  );
}

Navigation Theme

import { NavigationContainer, DefaultTheme, DarkTheme } from '@react-navigation/native';

function App() {
  const { colors, isDark } = useTheme();

  const navTheme = {
    ...(isDark ? DarkTheme : DefaultTheme),
    colors: {
      ...(isDark ? DarkTheme.colors : DefaultTheme.colors),
      background: colors.background,
      card: colors.card,
      primary: colors.primary,
      text: colors.text,
      border: colors.border,
    },
  };

  return (
    <NavigationContainer theme={navTheme}>
      <AppNavigator />
    </NavigationContainer>
  );
}

When not to use it

  • Hardcoding colors

Prerequisites

React Native

Limitations

  • Requires theme provider setup

How it compares

It uses a centralized theme provider and custom .pbcolors files for consistent styling.

Compared to similar skills

Theming System side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
Theming System (this skill)07moNo flagsBeginner
mobile-android-design1012moNo flagsIntermediate
ui-mobile14moNo flagsBeginner
building-ui04moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry