Markdown Converter
Agent skill for markdown-converter
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Color Guru is a React + TypeScript web application for generating accessible color palettes using advanced easing curves and HSL color interpolation. The app allows users to create visually consistent color gradients with real-time WCAG accessibility feedback.
npm run dev # Start Vite dev server at http://localhost:5173 npm run build # Type-check with tsc and build for production npm run preview # Preview production build locally npm run lint # Run ESLint on all .ts and .tsx files
The application's color generation is centralized in a single flow:
App.tsx maintains
ColorState (steps, hue, saturation, brightness, and optional pinnedColor) and uses useMemo to call generatePalette()
paletteGenerator.ts (
generatePalette()) orchestrates the entire color generation:
easingCurves.tscolorMath.ts utilities to interpolate HSL values and convert to RGB/hexPaletteData with colors array and value arrays for graphingConsumption: The resulting
PaletteData is consumed by:
Graph.tsx for visualizations (hue, saturation, brightness, luminance, sat×bri)PalettePreview.tsx for color swatches with accessibility indicators (📌 icon for pinned colors)ExportModal.tsx for CSS, JSON, plain text, and Figma SVG export formatssrc/utils/colorMath.ts)hexToHSL() supports both 3-char and 6-char hex notation with/without #src/utils/easingCurves.ts)CURVE_PRESETS maps curve names to bezier control points (from easings.net)src/utils/paletteGenerator.ts)exportAsCSS(), exportAsJSON(), exportAsPlainText(), exportAsSVG()Single-level React state in App.tsx:
colorState (ColorState interface) - all generation parametersactiveGraph - which visualization is displayedcollapsedSections - UI collapse state for control sectionslanguage - i18n language code for translationsNo external state management library; all components receive data via props.
Managed in
src/utils/translations.ts:
languageOptions array defines supported languagestranslations object contains all UI strings per languagegetTranslation(lang, key) retrieves translated textlanguageOptions and translationslongPath boolean toggles between shortest and longest hue transition pathsrate multiplier (0-2) to control intensity0.2126×R + 0.7152×G + 0.0722×B (with gamma correction)