about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2024-01-18 22:54:20 -0600
committerGitHub <noreply@github.com>2024-01-18 20:54:20 -0800
commit9803e174494c199cc426f70f04fb024518f05473 (patch)
tree86a3f5a16f716734201784c8b1f88c644d2df4bf
parent95f70a9a6aec3a4c1b23f837a26bc5c0d4266554 (diff)
downloadvoidsky-9803e174494c199cc426f70f04fb024518f05473.tar.zst
Use new palette values for main palette (#2566)
* Use new palette values for main palette

* Drawer bg in dark mode
-rw-r--r--bskyweb/templates/base.html12
-rw-r--r--src/alf/themes.ts4
-rw-r--r--src/lib/themes.ts110
-rw-r--r--src/view/shell/Drawer.tsx5
-rw-r--r--web/index.html12
5 files changed, 74 insertions, 69 deletions
diff --git a/bskyweb/templates/base.html b/bskyweb/templates/base.html
index 942e18fcc..50dbaa24b 100644
--- a/bskyweb/templates/base.html
+++ b/bskyweb/templates/base.html
@@ -62,26 +62,26 @@
     :root {
       --text: black;
       --background: white;
-      --backgroundLight: #F3F3F8;
+      --backgroundLight: hsl(211, 20%, 95%);
     }
     html.colorMode--dark {
       --text: white;
-      --background: black;
-      --backgroundLight: #26272D;
+      --background: hsl(211, 20%, 4%);
+      --backgroundLight: hsl(211, 20%, 20%);
       color-scheme: dark;
     }
     @media (prefers-color-scheme: light) {
       html.colorMode--system {
         --text: black;
         --background: white;
-        --backgroundLight: #F3F3F8;
+        --backgroundLight: hsl(211, 20%, 95%);
       }
     }
     @media (prefers-color-scheme: dark) {
       html.colorMode--system {
         --text: white;
-        --background: black;
-        --backgroundLight: #26272D;
+        --background: hsl(211, 20%, 4%);
+        --backgroundLight: hsl(211, 20%, 20%);
         color-scheme: dark;
       }
     }
diff --git a/src/alf/themes.ts b/src/alf/themes.ts
index acd180333..7c6b7dab4 100644
--- a/src/alf/themes.ts
+++ b/src/alf/themes.ts
@@ -171,7 +171,7 @@ export const light = {
       backgroundColor: lightPalette.contrast_300,
     },
     border: {
-      borderColor: lightPalette.contrast_200,
+      borderColor: lightPalette.contrast_100,
     },
     border_contrast: {
       borderColor: lightPalette.contrast_400,
@@ -278,7 +278,7 @@ export const dark: Theme = {
       color: darkPalette.black,
     },
     bg: {
-      backgroundColor: darkPalette.contrast_25,
+      backgroundColor: darkPalette.black,
     },
     bg_contrast_25: {
       backgroundColor: darkPalette.contrast_50,
diff --git a/src/lib/themes.ts b/src/lib/themes.ts
index ad7574db6..2d4515c77 100644
--- a/src/lib/themes.ts
+++ b/src/lib/themes.ts
@@ -2,30 +2,32 @@ import {Platform} from 'react-native'
 import type {Theme} from './ThemeContext'
 import {colors} from './styles'
 
+import {darkPalette, lightPalette} from '#/alf/themes'
+
 export const defaultTheme: Theme = {
   colorScheme: 'light',
   palette: {
     default: {
-      background: colors.white,
-      backgroundLight: colors.gray1,
-      text: colors.black,
-      textLight: colors.gray5,
-      textInverted: colors.white,
-      link: colors.blue3,
-      border: '#f0e9e9',
-      borderDark: '#e0d9d9',
-      icon: colors.gray4,
+      background: lightPalette.white,
+      backgroundLight: lightPalette.contrast_50,
+      text: lightPalette.black,
+      textLight: lightPalette.contrast_700,
+      textInverted: lightPalette.white,
+      link: lightPalette.primary_500,
+      border: lightPalette.contrast_100,
+      borderDark: lightPalette.contrast_200,
+      icon: lightPalette.contrast_500,
 
       // non-standard
-      textVeryLight: colors.gray4,
-      replyLine: colors.gray2,
-      replyLineDot: colors.gray3,
-      unreadNotifBg: '#ebf6ff',
-      unreadNotifBorder: colors.blue1,
-      postCtrl: '#71768A',
-      brandText: '#0066FF',
-      emptyStateIcon: '#B6B6C9',
-      borderLinkHover: '#cac1c1',
+      textVeryLight: lightPalette.contrast_400,
+      replyLine: lightPalette.contrast_100,
+      replyLineDot: lightPalette.contrast_200,
+      unreadNotifBg: lightPalette.primary_25,
+      unreadNotifBorder: lightPalette.primary_100,
+      postCtrl: lightPalette.contrast_500,
+      brandText: lightPalette.primary_500,
+      emptyStateIcon: lightPalette.contrast_300,
+      borderLinkHover: lightPalette.contrast_300,
     },
     primary: {
       background: colors.blue3,
@@ -50,15 +52,15 @@ export const defaultTheme: Theme = {
       icon: colors.green4,
     },
     inverted: {
-      background: colors.black,
-      backgroundLight: colors.gray6,
-      text: colors.white,
-      textLight: colors.gray3,
-      textInverted: colors.black,
-      link: colors.blue2,
-      border: colors.gray3,
-      borderDark: colors.gray2,
-      icon: colors.gray5,
+      background: darkPalette.black,
+      backgroundLight: darkPalette.contrast_50,
+      text: darkPalette.white,
+      textLight: darkPalette.contrast_700,
+      textInverted: darkPalette.black,
+      link: darkPalette.primary_500,
+      border: darkPalette.contrast_100,
+      borderDark: darkPalette.contrast_200,
+      icon: darkPalette.contrast_500,
     },
     error: {
       background: colors.red3,
@@ -292,26 +294,26 @@ export const darkTheme: Theme = {
   palette: {
     ...defaultTheme.palette,
     default: {
-      background: colors.black,
-      backgroundLight: colors.gray7,
-      text: colors.white,
-      textLight: colors.gray3,
-      textInverted: colors.black,
-      link: colors.blue3,
-      border: colors.gray7,
-      borderDark: colors.gray6,
-      icon: colors.gray4,
+      background: darkPalette.black,
+      backgroundLight: darkPalette.contrast_50,
+      text: darkPalette.white,
+      textLight: darkPalette.contrast_700,
+      textInverted: darkPalette.black,
+      link: darkPalette.primary_500,
+      border: darkPalette.contrast_100,
+      borderDark: darkPalette.contrast_200,
+      icon: darkPalette.contrast_500,
 
       // non-standard
-      textVeryLight: colors.gray4,
-      replyLine: colors.gray5,
-      replyLineDot: colors.gray6,
-      unreadNotifBg: colors.blue7,
-      unreadNotifBorder: colors.blue6,
-      postCtrl: '#707489',
-      brandText: '#0085ff',
-      emptyStateIcon: colors.gray4,
-      borderLinkHover: colors.gray5,
+      textVeryLight: darkPalette.contrast_400,
+      replyLine: darkPalette.contrast_100,
+      replyLineDot: darkPalette.contrast_200,
+      unreadNotifBg: darkPalette.primary_975,
+      unreadNotifBorder: darkPalette.primary_900,
+      postCtrl: darkPalette.contrast_500,
+      brandText: darkPalette.primary_500,
+      emptyStateIcon: darkPalette.contrast_300,
+      borderLinkHover: darkPalette.contrast_300,
     },
     primary: {
       ...defaultTheme.palette.primary,
@@ -322,15 +324,15 @@ export const darkTheme: Theme = {
       textInverted: colors.green2,
     },
     inverted: {
-      background: colors.white,
-      backgroundLight: colors.gray2,
-      text: colors.black,
-      textLight: colors.gray5,
-      textInverted: colors.white,
-      link: colors.blue3,
-      border: colors.gray3,
-      borderDark: colors.gray4,
-      icon: colors.gray1,
+      background: lightPalette.white,
+      backgroundLight: lightPalette.contrast_50,
+      text: lightPalette.black,
+      textLight: lightPalette.contrast_700,
+      textInverted: lightPalette.white,
+      link: lightPalette.primary_500,
+      border: lightPalette.contrast_100,
+      borderDark: lightPalette.contrast_200,
+      icon: lightPalette.contrast_500,
     },
   },
 }
diff --git a/src/view/shell/Drawer.tsx b/src/view/shell/Drawer.tsx
index 6f748755a..c30874c2f 100644
--- a/src/view/shell/Drawer.tsx
+++ b/src/view/shell/Drawer.tsx
@@ -53,6 +53,8 @@ import {useInviteCodesQuery} from '#/state/queries/invites'
 import {NavSignupCard} from '#/view/shell/NavSignupCard'
 import {TextLink} from '../com/util/Link'
 
+import {useTheme as useAlfTheme} from '#/alf'
+
 let DrawerProfileCard = ({
   account,
   onPressProfile,
@@ -106,6 +108,7 @@ export {DrawerProfileCard}
 
 let DrawerContent = ({}: {}): React.ReactNode => {
   const theme = useTheme()
+  const t = useAlfTheme()
   const pal = usePalette('default')
   const {_} = useLingui()
   const setDrawerOpen = useSetDrawerOpen()
@@ -208,7 +211,7 @@ let DrawerContent = ({}: {}): React.ReactNode => {
       testID="drawer"
       style={[
         styles.view,
-        theme.colorScheme === 'light' ? pal.view : styles.viewDarkMode,
+        theme.colorScheme === 'light' ? pal.view : t.atoms.bg_contrast_25,
       ]}>
       <SafeAreaView style={s.flex1}>
         <ScrollView style={styles.main}>
diff --git a/web/index.html b/web/index.html
index 46b20be1f..a82abea90 100644
--- a/web/index.html
+++ b/web/index.html
@@ -66,26 +66,26 @@
       :root {
         --text: black;
         --background: white;
-        --backgroundLight: #F3F3F8;
+        --backgroundLight: hsl(211, 20%, 95%);
       }
       html.colorMode--dark {
         --text: white;
-        --background: black;
-        --backgroundLight: #26272D;
+        --background: hsl(211, 20%, 4%);
+        --backgroundLight: hsl(211, 20%, 10%);
         color-scheme: dark;
       }
       @media (prefers-color-scheme: light) {
         html.colorMode--system {
           --text: black;
           --background: white;
-          --backgroundLight: #F3F3F8;
+          --backgroundLight: hsl(211, 20%, 95%);
         }
       }
       @media (prefers-color-scheme: dark) {
         html.colorMode--system {
           --text: white;
-          --background: black;
-          --backgroundLight: #26272D;
+          --background: hsl(211, 20%, 4%);
+          --backgroundLight: hsl(211, 20%, 10%);
           color-scheme: dark;
         }
       }