MCPcopy Index your code
hub / github.com/Innei/Pastel

github.com/Innei/Pastel @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
390 symbols 848 edges 182 files 3 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Pastel Palette

A comprehensive kawaii-inspired color system with OKLCH color space support, TypeScript definitions, and TailwindCSS v4 integration. Features a cute & kawaii aesthetic with soft, pastel tones.

Features

  • 🎨 OKLCH Color Space: Modern color format with sRGB and P3 fallbacks
  • 🌸 Kawaii Aesthetic: Soft pastel colors with high lightness values
  • 🔧 TypeScript Support: Full type definitions for all color values
  • 🎯 Semantic Colors: UIKit-inspired semantic color system
  • 🌓 Dark Mode: Automatic light/dark mode adaptation with multiple strategies
  • 💨 TailwindCSS v4: CSS-based configuration with @theme directives
  • 📦 Monorepo Structure: Modular packages for colors and TailwindCSS integration

Usage

TailwindCSS v4 integration with automatic CSS generation and color variants support.

/* Use generated CSS variables in your styles */
.my-element {
  color: var(--color-text);
  background-color: var(--color-background);
  border-color: var(--color-border);
}

Installation

# Install TailwindCSS integration
npm install @pastel-palette/tailwindcss

# Or using pnpm
pnpm add @pastel-palette/tailwindcss

Usage

TailwindCSS v4 Integration

  1. Import the generated theme CSS in your main CSS file:
/* Choose your color space - all include unified kawaii and high-contrast support */

/* OKLCH color space (recommended) */
@import '@pastel-palette/tailwindcss/dist/theme-oklch.css';

/* sRGB color space (fallback) */
@import '@pastel-palette/tailwindcss/dist/theme-srgb.css';

/* P3 Display color space (wide gamut) */
@import '@pastel-palette/tailwindcss/dist/theme-p3.css';
  1. Use the color variables in your TailwindCSS config or CSS:
.button {
  background-color: var(--color-accent);
  color: var(--color-white);
  border: 1px solid var(--color-border);
}

/* With opacity modifiers */
.overlay {
  background-color: var(--color-material-medium);
}

Color Variants Usage

The color system now supports three variants: regular, kawaii, and high-contrast. You can use them in two ways:

Method 1: Data Attributes (Responsive Override)

Use data attributes to apply color variants that automatically switch between light and dark modes:


<html data-contrast="low">


Kawaii colors with auto dark mode


</html>


<html data-contrast="high">



    High contrast colors with auto dark mode



</html>

Method 2: Fixed Color Classes (Static Colors)

Use suffixed classes for colors that don't respond to dark mode changes:





  Always kawaii, regardless of dark mode








  Always high contrast, regardless of dark mode








  Mixed light background with dark text



Color Categories

Regular Colors

  • blue, pink, purple, green, orange, yellow
  • sky, red, brown, gray, neutral, black, white
  • Available in three variants: regular (default), kawaii (softer), high-contrast (more accessible)

Semantic Colors

Element Colors

  • text - Primary text colors with depth levels
  • placeholder-text - Form placeholder text
  • border - Border colors with primary/secondary variants
  • separator - Divider/separator lines
  • link - Interactive link colors
  • disabled-control - Disabled UI controls
  • disabled-text - Disabled text elements

Background Colors

Depth levels: primary, secondary, tertiary, quaternary, quinary

Fill Colors

System fills with depth levels for UI components

Material Colors

Opacity-based materials:

  • ultra-thick (93% opacity)
  • thick (85% opacity)
  • medium (72% opacity)
  • thin (60% opacity)
  • ultra-thin (45% opacity)
  • opaque (100% opacity)

Application Colors

  • accent - Main accent color
  • primary - Primary brand color
  • secondary - Secondary brand color

Dark Mode & Color Variants

The unified theme system automatically handles dark mode via TailwindCSS v4's built-in dark mode support. All color variants (regular, kawaii, high-contrast) work seamlessly with dark mode.

Dark Mode Activation

Dark mode is activated using TailwindCSS v4's standard approach:


<html>
  <body class="dark:bg-background-dark">
    Content
  </body>
</html>


<html class="dark">
  <body class="bg-background">
    Content automatically uses dark colors
  </body>
</html>

Color Variant Control

Control color variants independently of dark mode:


<html data-contrast="low">
  <body class="bg-background text-text">
    Kawaii colors, dark mode follows OS
  </body>
</html>


<html data-contrast="high" class="dark">
  <body class="bg-background text-text">
    High contrast + dark mode
  </body>
</html>

Development

# Clone the repository
git clone https://github.com/Innei/pastel.git
cd pastel

# Install dependencies
pnpm install

# Regenerate TailwindCSS themes
cd packages/tailwindcss-colors && pnpm build

Color Philosophy

The pastel palette aesthetic emphasizes:

  • High lightness values (0.7-0.95 in OKLCH)
  • Moderate chroma (0.08-0.18) for soft appearance
  • Harmonious pastels that work well together
  • Gentle contrasts while maintaining accessibility

Color Variant Characteristics

Regular Colors (Default)

  • Balanced lightness and chroma for general use
  • WCAG AA compliant contrast ratios
  • Suitable for most UI applications

Kawaii Colors (-kawaii)

  • Higher lightness values (0.82-0.9 in OKLCH)
  • Lower chroma (0.08-0.14) for extra softness
  • Ultra-cute aesthetic with pastel softness
  • Perfect for kawaii/cute themed applications

High Contrast Colors (-hc)

  • Lower lightness values (0.4-0.6 in OKLCH)
  • Higher chroma (0.2-0.3) for vivid appearance
  • WCAG AAA compliant contrast ratios
  • Enhanced accessibility for visually impaired users

Starter Templates

Scaffold a new React app pre-wired with Vite 8, React Compiler, file-based routes, and the Pastel theme:

pnpm dlx degit Innei/Pastel/templates/react-starter my-app

See templates/react-starter for details.

License

2025 © Innei, Released under the MIT License.

Personal Website · GitHub @Innei

Extension points exported contracts — how you extend this code

ColorValue (Interface)
(no doc)
packages/colors/src/types/index.ts
TooltipProps (Interface)
(no doc)
templates/react-starter/src/components/ui/tooltip/tooltip.tsx
ProvidersProps (Interface)
(no doc)
docs/src/components/Providers.tsx
ColorVariants (Interface)
(no doc)
packages/colors/src/types/index.ts
DropdownMenuProps (Interface)
(no doc)
templates/react-starter/src/components/ui/dropdown-menu/dropdown-menu.tsx
ColorDetailsProps (Interface)
(no doc)
docs/src/components/ColorPalette/ColorDetails.tsx
SemanticColor (Interface)
(no doc)
packages/colors/src/types/index.ts
ComboboxOption (Interface)
(no doc)
templates/react-starter/src/components/ui/combobox/combobox.tsx

Core symbols most depended-on inside this repo

createColor
called by 372
packages/colors/src/utils.ts
cn
called by 93
templates/react-starter/src/lib/cn.ts
cn
called by 35
docs/src/utils/cn.ts
smooth
called by 30
docs/src/constants/spring.ts
getColorString
called by 29
packages/tailwindcss-colors/src/generator.ts
generateThemeVariable
called by 26
packages/tailwindcss-colors/src/generator.ts
toFixed
called by 12
packages/colors/src/utils.ts
parseOKLCH
called by 12
docs/src/components/ColorPalette/utils/colorUtils.ts

Shape

Function 289
Interface 94
Class 4
Method 3

Languages

TypeScript100%

Modules by API surface

templates/react-starter/src/components/ui/modal/imperative.tsx17 symbols
docs/src/components/ColorPalette/components/ColorSidebar.tsx17 symbols
packages/colors/src/utils.ts14 symbols
templates/react-starter/src/components/ui/modal/atoms.tsx11 symbols
templates/react-starter/src/components/ui/context-menu/store.ts11 symbols
packages/tailwindcss-colors/src/generator.ts11 symbols
packages/colors/src/types/index.ts10 symbols
docs/src/components/Examples/AlertExamples.tsx10 symbols
docs/src/components/ColorPalette/components/CommandPalette.tsx9 symbols
templates/react-starter/src/components/ui/navigation-menu/navigation-menu.tsx8 symbols
templates/react-starter/src/features/design-mockup/components/layout.tsx7 symbols
templates/react-starter/src/features/design-mockup/components/display.tsx7 symbols

For agents

$ claude mcp add Pastel \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact