mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-25 00:16:41 +02:00
fix: PDF-Grünton dunkler + Buttons gleichbreit
- darkenColor() Funktion: extrahierte Logo-Farbe um 30% abdunkeln (gilt für PDF und DOCX Export) → kräftigerer, druckfreundlicher Ton - ExpertProfileTab: min-width: 130px für btnPrimary und btnSecondary → alle Aktions-Buttons haben einheitliche Mindestbreite Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
dabd36349e
commit
da4a036e8a
2 changed files with 14 additions and 3 deletions
|
|
@ -105,6 +105,14 @@ function lightenColor(hex: string, factor: number): string {
|
|||
return `#${lr.toString(16).padStart(2, '0')}${lg.toString(16).padStart(2, '0')}${lb.toString(16).padStart(2, '0')}`;
|
||||
}
|
||||
|
||||
function darkenColor(hex: string, factor: number): string {
|
||||
const { r, g, b } = hexToRgb(hex);
|
||||
const dr = Math.round(r * (1 - factor));
|
||||
const dg = Math.round(g * (1 - factor));
|
||||
const db = Math.round(b * (1 - factor));
|
||||
return `#${dr.toString(16).padStart(2, '0')}${dg.toString(16).padStart(2, '0')}${db.toString(16).padStart(2, '0')}`;
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// ProfileExportService
|
||||
// ============================================================
|
||||
|
|
@ -256,7 +264,8 @@ export class ProfileExportService {
|
|||
// Akzentfarbe dynamisch aus Logo extrahieren
|
||||
if (platformLogo) {
|
||||
const extracted = await this.extractDominantColor(platformLogo);
|
||||
if (extracted) accentColor = extracted;
|
||||
// Extrahierte Farbe um 30% abdunkeln damit sie im Druck kräftiger wirkt
|
||||
if (extracted) accentColor = darkenColor(extracted, 0.30);
|
||||
}
|
||||
|
||||
const fullName = `${data.firstName} ${data.lastName}`;
|
||||
|
|
@ -664,10 +673,10 @@ export class ProfileExportService {
|
|||
} catch { /* ignore */ }
|
||||
}
|
||||
|
||||
// Dominante Farbe aus Logo extrahieren
|
||||
// Dominante Farbe aus Logo extrahieren und abdunkeln
|
||||
if (platformLogo) {
|
||||
const extracted = await this.extractDominantColor(platformLogo);
|
||||
if (extracted) accentColor = extracted;
|
||||
if (extracted) accentColor = darkenColor(extracted, 0.30);
|
||||
}
|
||||
|
||||
let companyFooterText: string | null = null;
|
||||
|
|
|
|||
|
|
@ -279,6 +279,7 @@
|
|||
/* === Buttons === */
|
||||
.btnPrimary {
|
||||
height: 32px;
|
||||
min-width: 130px;
|
||||
padding: 0 1rem;
|
||||
background: var(--color-primary);
|
||||
color: white;
|
||||
|
|
@ -303,6 +304,7 @@
|
|||
|
||||
.btnSecondary {
|
||||
height: 32px;
|
||||
min-width: 130px;
|
||||
padding: 0 1rem;
|
||||
background: transparent;
|
||||
color: var(--color-text-secondary);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue