Spaces:
Sleeping
Sleeping
Update run.py
Browse files
run.py
CHANGED
|
@@ -31,76 +31,76 @@ def compute(primary_color, secondary_color, neutral_color):
|
|
| 31 |
neutral_shades = [adjust_brightness(neutral_color, p) for p in [90, 75, 50, 25, 10, 0, -10, -25, -50, -75, -90]]
|
| 32 |
|
| 33 |
css = f"""
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
"""
|
| 105 |
|
| 106 |
return css
|
|
|
|
| 31 |
neutral_shades = [adjust_brightness(neutral_color, p) for p in [90, 75, 50, 25, 10, 0, -10, -25, -50, -75, -90]]
|
| 32 |
|
| 33 |
css = f"""
|
| 34 |
+
:root {{
|
| 35 |
+
--primary-50: {primary_shades[0]} !important;
|
| 36 |
+
--primary-100: {primary_shades[1]} !important;
|
| 37 |
+
--primary-200: {primary_shades[2]} !important;
|
| 38 |
+
--primary-300: {primary_shades[3]} !important;
|
| 39 |
+
--primary-400: {primary_shades[4]} !important;
|
| 40 |
+
--primary-500: {primary_shades[5]} !important;
|
| 41 |
+
--primary-600: {primary_shades[6]} !important;
|
| 42 |
+
--primary-700: {primary_shades[7]} !important;
|
| 43 |
+
--primary-800: {primary_shades[8]} !important;
|
| 44 |
+
--primary-900: {primary_shades[9]} !important;
|
| 45 |
+
--primary-950: {primary_shades[10]} !important;
|
| 46 |
+
--secondary-50: {secondary_shades[0]} !important;
|
| 47 |
+
--secondary-100: {secondary_shades[1]} !important;
|
| 48 |
+
--secondary-200: {secondary_shades[2]} !important;
|
| 49 |
+
--secondary-300: {secondary_shades[3]} !important;
|
| 50 |
+
--secondary-400: {secondary_shades[4]} !important;
|
| 51 |
+
--secondary-500: {secondary_shades[5]} !important;
|
| 52 |
+
--secondary-600: {secondary_shades[6]} !important;
|
| 53 |
+
--secondary-700: {secondary_shades[7]} !important;
|
| 54 |
+
--secondary-800: {secondary_shades[8]} !important;
|
| 55 |
+
--secondary-900: {secondary_shades[9]} !important;
|
| 56 |
+
--secondary-950: {secondary_shades[10]} !important;
|
| 57 |
+
--neutral-50: {neutral_shades[0]} !important;
|
| 58 |
+
--neutral-100: {neutral_shades[1]} !important;
|
| 59 |
+
--neutral-200: {neutral_shades[2]} !important;
|
| 60 |
+
--neutral-300: {neutral_shades[3]} !important;
|
| 61 |
+
--neutral-400: {neutral_shades[4]} !important;
|
| 62 |
+
--neutral-500: {neutral_shades[5]} !important;
|
| 63 |
+
--neutral-600: {neutral_shades[6]} !important;
|
| 64 |
+
--neutral-700: {neutral_shades[7]} !important;
|
| 65 |
+
--neutral-800: {neutral_shades[8]} !important;
|
| 66 |
+
--neutral-900: {neutral_shades[9]} !important;
|
| 67 |
+
--neutral-950: {neutral_shades[10]} !important;
|
| 68 |
+
}}
|
| 69 |
+
.dark {{
|
| 70 |
+
--primary-50: {primary_shades[0]} !important;
|
| 71 |
+
--primary-100: {primary_shades[1]} !important;
|
| 72 |
+
--primary-200: {primary_shades[2]} !important;
|
| 73 |
+
--primary-300: {primary_shades[3]} !important;
|
| 74 |
+
--primary-400: {primary_shades[4]} !important;
|
| 75 |
+
--primary-500: {primary_shades[5]} !important;
|
| 76 |
+
--primary-600: {primary_shades[6]} !important;
|
| 77 |
+
--primary-700: {primary_shades[7]} !important;
|
| 78 |
+
--primary-800: {primary_shades[8]} !important;
|
| 79 |
+
--primary-900: {primary_shades[9]} !important;
|
| 80 |
+
--primary-950: {primary_shades[10]} !important;
|
| 81 |
+
--secondary-50: {secondary_shades[0]} !important;
|
| 82 |
+
--secondary-100: {secondary_shades[1]} !important;
|
| 83 |
+
--secondary-200: {secondary_shades[2]} !important;
|
| 84 |
+
--secondary-300: {secondary_shades[3]} !important;
|
| 85 |
+
--secondary-400: {secondary_shades[4]} !important;
|
| 86 |
+
--secondary-500: {secondary_shades[5]} !important;
|
| 87 |
+
--secondary-600: {secondary_shades[6]} !important;
|
| 88 |
+
--secondary-700: {secondary_shades[7]} !important;
|
| 89 |
+
--secondary-800: {secondary_shades[8]} !important;
|
| 90 |
+
--secondary-900: {secondary_shades[9]} !important;
|
| 91 |
+
--secondary-950: {secondary_shades[10]} !important;
|
| 92 |
+
--neutral-50: {neutral_shades[0]} !important;
|
| 93 |
+
--neutral-100: {neutral_shades[1]} !important;
|
| 94 |
+
--neutral-200: {neutral_shades[2]} !important;
|
| 95 |
+
--neutral-300: {neutral_shades[3]} !important;
|
| 96 |
+
--neutral-400: {neutral_shades[4]} !important;
|
| 97 |
+
--neutral-500: {neutral_shades[5]} !important;
|
| 98 |
+
--neutral-600: {neutral_shades[6]} !important;
|
| 99 |
+
--neutral-700: {neutral_shades[7]} !important;
|
| 100 |
+
--neutral-800: {neutral_shades[8]} !important;
|
| 101 |
+
--neutral-900: {neutral_shades[9]} !important;
|
| 102 |
+
--neutral-950: {neutral_shades[10]} !important;
|
| 103 |
+
}}
|
| 104 |
"""
|
| 105 |
|
| 106 |
return css
|