Repository navigation
Visualization System Color Mapping
Color Mapping defines how TokenPrint uses hue, saturation, and brightness to convey meaning. The application adheres to a strict monochromatic UI, saving bright colors exclusively for the 3D data visualizations.
If colors are applied arbitrarily, the user is forced to guess what they mean. By establishing a rigid color-coding system (e.g., Attention is always Blue, MLP is always Green), users can instantly visually parse a massive transformer stack without reading labels.
All canonical colors are defined in a single source of truth: lib/sceneColors.ts.
- Attention (Q/K/V/O): Shades of Blue
- MLP (Gate/Up/Down): Shades of Green / Teal
- LayerNorm (RMSNorm): Warm Yellow / Orange
- Embed / Unembed: Purple
- Residual Stream: Neutral Gray
- No UI Contamination: The React panels, buttons, and text are strictly black, white, or gray.
- Brightness = Magnitude: The brightness of a color (its emission) is reserved for data magnitude. A brighter blue attention blade means a higher activation strength for that layer.
- Probability = Grayscale: In the Top-k Skyline, probability is not colored; it is represented by the physical height and grayscale emission of the bar.
flowchart LR
Data[Operation Type: 'mlp.gate'] --> Lookup{sceneColors.ts}
Lookup -- "Teal" --> Material[Apply to 3D Mesh]
UI[HTML Button] --> UILookup{Tailwind CSS}
UILookup -- "bg-gray-800" --> Render[Render UI]
| Previous | Home | Next |
|---|---|---|
| Animation System | Home | Camera System |
TokenPrint Wiki | Home | Getting Started | User Guide | Concepts | Architecture | API | GitHub
TokenPrint is an interactive 3D visualization platform for exploring transformer architectures, tensors, and real-time LLM inference.
- User Guide
- Architecture Explorer
- Live Inference
- Tensor Inspector
- Camera Controls
- HUD
- Timeline
- Scene Navigation
- Transformer Concepts
- Tokenization
- Embeddings
- Positional Encoding
- RoPE
- Multi-Head Attention
- KV Cache
- LayerNorm
- Feed Forward Network
- Residual Connections
- Logits
- Softmax
- Sampling
- Autoregressive Generation
- Visualization System
- Scene Graph
- Geometry
- Materials
- Animation System
- Color Mapping
- Camera System
- Interaction Model
- Architecture
- Overall Architecture
- Frontend
- Backend
- WebSocket Protocol
- Data Pipeline
- Renderer
- Event System