# manjunadh-velpuri/palettelab-color-studio architecture

> Architecture diagram of the GitHub repository manjunadh-velpuri/palettelab-color-studio, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/manjunadh-velpuri/palettelab-color-studio
- Repository: https://github.com/manjunadh-velpuri/palettelab-color-studio

## Overview

PaletteLab is a browser-based color studio: users enter or extract colors, adjust and organize them, view palettes in different formats, and export artwork. The graph shows the web entry point and the documented feature branches, plus color math, rendering, naming, and UI composition. Several route and component implementations were not excerpted, so some links rely on README descriptions or the entry-point reference list; unsampled behavior is not inferred beyond those references.

Main entry points: [`api/index.py`](https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/api/index.py) (Web entry and routes), [`core_logic/core/color_utils.py`](https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/core_logic/core/color_utils.py) (Color conversion math), [`core_logic/core/exporter.py`](https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/core_logic/core/exporter.py) (PNG and SVG export), [`core_logic/core/renderer.py`](https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/core_logic/core/renderer.py) (Palette layout renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Web entry and routes<br/>[index.py]"]
  node_session[("Palette session state<br/>[index.py]")]
  node_ui["Workspace components"]
  node_theme["Theme loading<br/>[theme_loader.py]"]
end

subgraph group_input["Color input"]
  node_textparse["Text color parsers"]
  node_photo["Photo extraction<br/>[photo_extractor.py]"]
end

subgraph group_palette["Palette tools"]
  node_generator["Palette generation"]
  node_matcher["Color naming matcher<br/>[color_matcher.py]"]
  node_adjust["Shade and tint tools<br/>[color_utils.py]"]
end

subgraph group_presentation["Display and export"]
  node_conversion["Format conversion table"]
  node_renderer["Palette layout renderer<br/>[renderer.py]"]
  node_exporter["PNG and SVG export<br/>[exporter.py]"]
end

subgraph group_foundation["Color foundation"]
  node_math["Color conversion math<br/>[color_utils.py]"]
  node_color_db[("Color name database<br/>[colors.db]")]
end

node_user(("Designer"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_ui
node_app -->|"updates"| node_session
node_app -->|"extracts text colors"| node_textparse
node_app -->|"extracts photo colors"| node_photo
node_app -->|"generates palettes"| node_generator
node_app -->|"tweaks colors"| node_adjust
node_app -->|"shows conversions"| node_conversion
node_app -->|"renders preview"| node_renderer
node_app -->|"exports palette"| node_exporter
node_ui -->|"loads theme"| node_theme
node_textparse -->|"converts formats"| node_math
node_photo -->|"converts colors"| node_math
node_generator -->|"names colors"| node_matcher
node_matcher -->|"queries"| node_color_db
node_renderer -->|"uses color math"| node_math
node_exporter -->|"renders artwork"| node_renderer
node_exporter -->|"uses color math"| node_math
node_conversion -->|"converts formats"| node_math

click node_app "https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/api/index.py"
click node_session "https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/api/index.py"
click node_ui "https://github.com/manjunadh-velpuri/palettelab-color-studio/tree/main/web_ui/components"
click node_textparse "https://github.com/manjunadh-velpuri/palettelab-color-studio/tree/main/core_logic/parsers"
click node_photo "https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/core_logic/extraction/photo_extractor.py"
click node_generator "https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/core_logic/generatePalette/palette_generator.py"
click node_matcher "https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/core_logic/generatePalette/color_matcher.py"
click node_adjust "https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/core_logic/core/color_utils.py"
click node_conversion "https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/web_ui/components/conversion_table.py"
click node_renderer "https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/core_logic/core/renderer.py"
click node_exporter "https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/core_logic/core/exporter.py"
click node_theme "https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/web_ui/theme_loader.py"
click node_math "https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/core_logic/core/color_utils.py"
click node_color_db "https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/core_logic/generatePalette/colors.db"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_session,node_ui,node_theme toneBlue
class node_textparse,node_photo toneAmber
class node_generator,node_matcher,node_adjust toneMint
class node_conversion,node_renderer,node_exporter toneRose
class node_math,node_color_db,node_user toneIndigo
```

## Components

### Web application

- [Web entry and routes](https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/api/index.py): `api/index.py`
- [Palette session state](https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/api/index.py): `api/index.py`
- [Workspace components](https://github.com/manjunadh-velpuri/palettelab-color-studio/tree/main/web_ui/components): `web_ui/components`
- [Theme loading](https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/web_ui/theme_loader.py): `web_ui/theme_loader.py`

### Color input

- [Text color parsers](https://github.com/manjunadh-velpuri/palettelab-color-studio/tree/main/core_logic/parsers): `core_logic/parsers`
- [Photo extraction](https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/core_logic/extraction/photo_extractor.py): `core_logic/extraction/photo_extractor.py`

### Palette tools

- [Palette generation](https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/core_logic/generatePalette/palette_generator.py): `core_logic/generatePalette/palette_generator.py`
- [Color naming matcher](https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/core_logic/generatePalette/color_matcher.py): `core_logic/generatePalette/color_matcher.py`
- [Shade and tint tools](https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/core_logic/core/color_utils.py): `core_logic/core/color_utils.py`

### Display and export

- [Format conversion table](https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/web_ui/components/conversion_table.py): `web_ui/components/conversion_table.py`
- [Palette layout renderer](https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/core_logic/core/renderer.py): `core_logic/core/renderer.py`
- [PNG and SVG export](https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/core_logic/core/exporter.py): `core_logic/core/exporter.py`

### Color foundation

- [Color conversion math](https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/core_logic/core/color_utils.py): `core_logic/core/color_utils.py`
- [Color name database](https://github.com/manjunadh-velpuri/palettelab-color-studio/blob/main/core_logic/generatePalette/colors.db): `core_logic/generatePalette/colors.db`

### Other components

- **Designer**

## Connections

- Designer → Web entry and routes: uses (evidence: `README.md`)
- Web entry and routes → Workspace components: renders (evidence: `api/index.py`)
- Web entry and routes → Palette session state: updates (evidence: `api/index.py`)
- Web entry and routes → Text color parsers: extracts text colors (evidence: `api/index.py`)
- Web entry and routes → Photo extraction: extracts photo colors (evidence: `api/index.py`)
- Web entry and routes → Palette generation: generates palettes (evidence: `api/index.py`)
- Web entry and routes → Shade and tint tools: tweaks colors (evidence: `README.md`)
- Web entry and routes → Format conversion table: shows conversions (evidence: `api/index.py`)
- Web entry and routes → Palette layout renderer: renders preview (evidence: `api/index.py`)
- Web entry and routes → PNG and SVG export: exports palette (evidence: `api/index.py`)
- Workspace components → Theme loading: loads theme (evidence: `web_ui/components/layout.py`)
- Text color parsers → Color conversion math: converts formats (evidence: `core_logic/parsers/cmyk_parser.py`)
- Photo extraction → Color conversion math: converts colors (evidence: `core_logic/extraction/photo_extractor.py`)
- Palette generation → Color naming matcher: names colors (evidence: `core_logic/generatePalette/palette_generator.py`)
- Color naming matcher → Color name database: queries (evidence: `core_logic/generatePalette/color_matcher.py`)
- Palette layout renderer → Color conversion math: uses color math (evidence: `core_logic/core/renderer.py`)
- PNG and SVG export → Palette layout renderer: renders artwork (evidence: `core_logic/core/exporter.py`)
- PNG and SVG export → Color conversion math: uses color math (evidence: `core_logic/core/exporter.py`)
- Format conversion table → Color conversion math: converts formats (evidence: `web_ui/components/conversion_table.py`)
