Summary
Add a color converter at app/api/routes-f/color-convert/route.ts. Auto-detect input format and return all formats.
Requirements
- POST body { input: string }
- Return { hex, rgb, hsl, hsv, cmyk } with optional alpha
- Auto-detect hex, rgb(), rgba(), hsl(), hsla(), hsv()
- Round numerics to 2 decimals
- Reject invalid input with 400
- Tests against known reference colors (red = #FF0000 = rgb(255,0,0) = hsl(0,100%,50%))
Scope Constraint - READ BEFORE STARTING
All files for this task must live inside app/api/routes-f/. This includes the route handler, helpers/utilities, types, and tests. Do NOT modify, import from, or add files to lib/, utils/, types/, components/, or anywhere else outside app/api/routes-f/. If you need shared logic, duplicate it inside your subfolder. Keeping everything scoped to this folder is intentional - it keeps these tasks independent and mergeable in any order.
Summary
Add a color converter at app/api/routes-f/color-convert/route.ts. Auto-detect input format and return all formats.
Requirements
Scope Constraint - READ BEFORE STARTING
All files for this task must live inside app/api/routes-f/. This includes the route handler, helpers/utilities, types, and tests. Do NOT modify, import from, or add files to lib/, utils/, types/, components/, or anywhere else outside app/api/routes-f/. If you need shared logic, duplicate it inside your subfolder. Keeping everything scoped to this folder is intentional - it keeps these tasks independent and mergeable in any order.