8 Commits

Author SHA1 Message Date
d.viti
e5a72183b5 feat: Add back button to return to index.html in both modes
All checks were successful
Build and Deploy / build (push) Successful in 32s
2025-10-14 00:46:43 +02:00
d.viti
fdc033f334 fix: Remove corrupted HTML in shop-mode logo section
Fixed duplicate and malformed HTML tags in logo upload section:
- Removed duplicate <div x-show="logoColor"> opening tag (line 171-172)
- Removed orphan ></span> closing tag (line 190-191)
- Cleaned up color palette display section

The corrupted lines were causing layout issues where the logo section
wasn't properly closed before the vendor input fields.

Verification:
- project-mode.html: Already correct, div balance = 0
- shop-mode.html: Fixed, removed lines 171-172 and 190-191
- Docker build: Successful
- Both files now have properly structured HTML
2025-10-14 00:30:05 +02:00
d.viti
95f26e1bd4 feat: K-means color palette extraction with average brand color
Algorithm improvements:
- Implemented K-means clustering (3-6 clusters based on image size)
- Extract complete color palette from logo (5-7 representative colors)
- Calculate average RGB of palette colors as final brand color
- Sort palette by saturation (most vibrant colors first)

Filters applied:
- Skip whites (RGB > 235), blacks (RGB < 20), grays (saturation < 0.2)
- Filter palette by lightness (0.25-0.80 range)
- 10 iterations K-means with convergence check

UI improvements:
- Show extracted color palette as color chips
- Display final brand color (average of palette)
- Labeled as 'Colore Brand (media palette)'
- Hover effect on palette colors with tooltips
- Console logging for debugging

Benefits:
- More accurate color extraction from complex logos
- Avoids picking background colors (white/black)
- Represents true brand identity (not just most common)
- Works better with gradients and multi-color logos
- Average creates balanced, professional brand color
2025-10-14 00:22:47 +02:00
d.viti
546d7201b0 feat: Advanced color palette extraction algorithm
- Build complete color palette instead of single dominant color
- Filter out whites (RGB > 240), blacks (RGB < 15), and grays (saturation < 0.15)
- Calculate HSL values for better color analysis
- Quantize colors to group similar shades together
- Score colors based on:
  * Saturation (prefer vibrant colors)
  * Frequency (weight by occurrence)
  * Optimal lightness (0.4-0.6 range preferred)
- Select best scoring color from palette
- Skip too light (> 0.85) or too dark (< 0.20) colors
- Improved sampling rate (every 4 pixels instead of 10)
- Console logging for debugging extracted palette
- Fallback to emerald green if no suitable colors found
2025-10-14 00:16:37 +02:00
d.viti
e1173a1fbc feat: Modernized PDF design with web panel style and dynamic branding
- Added logo upload functionality with base64 encoding
- Automatic dominant color extraction from logo
- Complete PDF redesign with modern card-based layout
- Gradient header with company logo and name
- Information cards for vendor and client data
- Table with alternating row backgrounds
- Summary box with brand color highlights
- Per-item IVA support in calculations and PDF
- Dynamic accent colors based on logo
- Responsive layout with rounded corners and shadows
- Professional footer with generation timestamp
2025-10-14 00:14:55 +02:00
d.viti
ea504d7b37 Add logo upload and color extraction for vendor
- Allow uploading a company logo and extract its dominant color - Show
logo preview and extracted color in the UI - Use logo and color for PDF
branding and styling - Add per-item IVA field and calculation - Update
PDF export to show logo, brand color, and IVA per item
2025-10-14 00:12:07 +02:00
d.viti
7a5e8e5760 Add advanced shop-mode calculator with PDF export and save/load
All checks were successful
Build and Deploy / build (push) Successful in 29s
2025-10-13 23:58:21 +02:00
d.viti
23ec5d5f32 Add multi-mode HTML, Docker, Helm chart, and deploy script
All checks were successful
Build and Deploy / build (push) Successful in 46s
- Add shop-mode.html and project-mode.html for separate calculation
modes - Refactor index.html as a landing page for mode selection - Add
Dockerfile with optimized nginx config and healthcheck - Add
.dockerignore for cleaner Docker builds - Add deploy.sh for
Helm/Kubernetes deployment automation - Add helm-chart/ with
values.yaml, Chart.yaml, templates, and documentation - Update README.md
with full instructions, features, and CI/CD examples
2025-10-13 23:25:33 +02:00