@@ -47,6 +47,10 @@ body {
4747 /* Colors — Purple business colorway */
4848 --pg-primary : #7c3aed ;
4949 --pg-primary-contrast : #6d28d9 ;
50+ /* Background shade used wherever white text sits on purple (buttons, badges). */
51+ /* Must keep contrast >= 4.5:1 against white in both themes. */
52+ --pg-primary-bg : #7c3aed ; /* white = 4.76:1, passes AA */
53+ --pg-primary-bg-hover : #6d28d9 ; /* white = 5.84:1 */
5054 --pg-general-background : #ffffff ;
5155 --pg-soft-background : #f5f3ff ;
5256 --pg-strong-background : #ddd6fe ;
@@ -65,7 +69,11 @@ body {
6569
6670.dark {
6771 --pg-primary : #a78bfa ;
68- --pg-primary-contrast : #a78bfa ;
72+ --pg-primary-contrast : #6d28d9 ;
73+ /* Keep the darker purple in dark mode too so white-text-on-purple */
74+ /* buttons / badges keep a passing contrast ratio. */
75+ --pg-primary-bg : #7c3aed ;
76+ --pg-primary-bg-hover : #6d28d9 ;
6977 --pg-general-background : #0f0a1e ;
7078 --pg-soft-background : #1a1030 ;
7179 --pg-strong-background : #2d1b69 ;
@@ -287,7 +295,7 @@ textarea.pg-input:disabled {
287295 font-weight : var (--pg-font-weight-medium );
288296 font-family : var (--pg-font-family );
289297 border-radius : var (--pg-border-radius-sm );
290- background : var (--pg-primary );
298+ background : var (--pg-primary-bg );
291299 color : #ffffff ;
292300 box-shadow : 0 4px 3px -2px rgba (0 , 0 , 0 , 0.3 );
293301 cursor : pointer ;
@@ -300,7 +308,7 @@ textarea.pg-input:disabled {
300308}
301309
302310.primary-btn :hover:not (:disabled ) {
303- background : var (--pg-primary-contrast );
311+ background : var (--pg-primary-bg-hover );
304312 transform : translateY (-1px );
305313 box-shadow : 0 6px 4px -2px rgba (0 , 0 , 0 , 0.3 );
306314}
0 commit comments