Documentation Index
Fetch the complete documentation index at: https://mintlify.com/inkdown/inkdown/llms.txt
Use this file to discover all available pages before exploring further.
Themes
Inkdown provides a flexible theming system that allows you to customize the editor’s appearance to match your preferences and reduce eye strain.Built-in Themes
Inkdown includes two built-in themes:Default Dark
- ID:
default-dark - Name: Default Dark
- Author: Inkdown
- Color Scheme: Dark mode
- Description: A carefully crafted dark theme with excellent contrast and readability
Default Light
- ID:
default-light - Name: Default Light
- Author: Inkdown
- Color Scheme: Light mode
- Description: A clean, minimal light theme for daytime use
Color Schemes
Inkdown themes support two color schemes:- Dark: Low-luminance background, high-luminance text
- Light: High-luminance background, low-luminance text
Switching Themes
Using Settings
- Open Settings with
Cmd/Ctrl+, - Navigate to Appearance
- Select a theme from the Theme dropdown
- The theme will be applied immediately
Programmatic Theme Switching
Themes can be changed programmatically through theThemeManager:
Switching Color Scheme
You can switch between light and dark modes:How Themes Work
CSS Variables
Inkdown uses CSS variables for theming, allowing instant theme changes without page reload:Theme Architecture
The theming system consists of several components:- ThemeManager: Core state management and event emission
- ThemeConfig: Theme metadata (name, author, supported modes)
- ParsedTheme: Theme colors as JavaScript objects
- CSS Content: Actual CSS variables for custom themes
Platform-Specific Rendering
- Desktop:
DOMThemeRendererapplies CSS to the document - Mobile:
ExpoThemeContextprovides theme via React Context
Installing Community Themes
Theme Directory Structure
Custom themes are stored in the themes directory with this structure:Theme Manifest
Each theme includes amanifest.json file:
Theme CSS Files
Theme CSS files define color variables:Installing a Theme (Coming Soon)
Once community theme support is enabled:- Download the theme folder
- Open Settings > Appearance
- Click Install Theme
- Select the theme folder
- The theme will appear in your theme list
Reloading Themes
After installing or modifying themes:Creating Custom Themes
Theme Development
To create a custom theme:- Create a new directory in the themes folder
- Add a
manifest.jsonwith theme metadata - Create
dark.cssand/orlight.cssfiles - Define CSS variables for all required colors
- Test the theme in Inkdown
Required CSS Variables
Your theme should define these essential variables: Background--color-bg: Main background--color-bg-secondary: Secondary backgrounds--color-bg-tertiary: Tertiary backgrounds
--color-text: Primary text--color-text-secondary: Secondary text--color-text-muted: Muted/disabled text
--color-primary: Primary accent--color-success: Success states--color-warning: Warning states--color-error: Error states
--color-syntax-*: Syntax highlighting colors--color-border: Borders and dividers--color-hover: Hover states--color-active: Active/selected states
Theme Testing
Test your theme thoroughly:- Switch between color schemes
- Check all UI elements (editor, sidebar, modals)
- Verify syntax highlighting for various languages
- Test in both editor and preview modes
- Check contrast ratios for accessibility
Theme Events
Listen for theme changes in your plugins:Theme Change Event
Thetheme-changed event includes:
Theme Persistence
Your theme preference is automatically saved and persisted across sessions:- Theme selection saved to app config
- Color scheme preference remembered
- Settings sync with workspace (if sync enabled)
Performance
Instant Switching
Theme changes are instant because:- CSS variables update without page reload
- No JavaScript re-renders required
- Theme state cached for quick access
Caching
The ThemeManager caches parsed theme objects:Accessibility
When creating themes, consider:- Contrast Ratios: Minimum 4.5:1 for normal text, 3:1 for large text
- Color Blindness: Don’t rely solely on color to convey information
- Focus Indicators: Ensure focus states are clearly visible
- Reduced Motion: Avoid theme-related animations
Troubleshooting
Theme Not Applying
- Check console for errors
- Verify theme files are in correct location
- Ensure
manifest.jsonis valid JSON - Reload custom themes
Missing Colors
If UI elements appear unstyled:- Check that all required CSS variables are defined
- Verify variable names match exactly (case-sensitive)
- Test with a built-in theme first
Performance Issues
If theme switching is slow:- Clear theme cache
- Reduce number of custom themes
- Check for CSS syntax errors
Next Steps
- Optimize your editing workflow with Keyboard Shortcuts
- Master the editor features in Editor Basics
- Set up Sync to share themes across devices
