From fc1535696b99c4eb5f8462a2f217ee1a125c6fcb Mon Sep 17 00:00:00 2001 From: Richard Shiue <71320345+richardshiue@users.noreply.github.com> Date: Fri, 23 Sep 2022 01:20:01 +0800 Subject: [PATCH 1/2] fix: color code for tint 9 --- frontend/app_flowy/packages/flowy_infra/lib/theme.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app_flowy/packages/flowy_infra/lib/theme.dart b/frontend/app_flowy/packages/flowy_infra/lib/theme.dart index 04b4a19fdb..9bb52c89e7 100644 --- a/frontend/app_flowy/packages/flowy_infra/lib/theme.dart +++ b/frontend/app_flowy/packages/flowy_infra/lib/theme.dart @@ -104,7 +104,7 @@ class AppTheme { ..tint6 = const Color(0xfff5ffdc) ..tint7 = const Color(0xffddffd6) ..tint8 = const Color(0xffdefff1) - ..tint9 = const Color(0xffdefff1) + ..tint9 = const Color(0xffe1fbff) ..main1 = const Color(0xff00bcf0) ..main2 = const Color(0xff00b7ea) ..textColor = _black From e5f5169a399751eb79655cb31155c31e05de4c84 Mon Sep 17 00:00:00 2001 From: Richard Shiue <71320345+richardshiue@users.noreply.github.com> Date: Fri, 23 Sep 2022 01:21:04 +0800 Subject: [PATCH 2/2] style: code auto-format --- .../packages/flowy_infra/lib/theme.dart | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/frontend/app_flowy/packages/flowy_infra/lib/theme.dart b/frontend/app_flowy/packages/flowy_infra/lib/theme.dart index 9bb52c89e7..cba65aa7fc 100644 --- a/frontend/app_flowy/packages/flowy_infra/lib/theme.dart +++ b/frontend/app_flowy/packages/flowy_infra/lib/theme.dart @@ -152,7 +152,8 @@ class AppTheme { ThemeData get themeData { var t = ThemeData( textTheme: TextTheme(bodyText2: TextStyle(color: textColor)), - textSelectionTheme: TextSelectionThemeData(cursorColor: main2, selectionHandleColor: main2), + textSelectionTheme: TextSelectionThemeData( + cursorColor: main2, selectionHandleColor: main2), primaryIconTheme: IconThemeData(color: hover), iconTheme: IconThemeData(color: shader1), canvasColor: shader6, @@ -179,7 +180,8 @@ class AppTheme { toggleableActiveColor: main1); } - Color shift(Color c, double d) => ColorUtils.shiftHsl(c, d * (isDark ? -1 : 1)); + Color shift(Color c, double d) => + ColorUtils.shiftHsl(c, d * (isDark ? -1 : 1)); } class ColorUtils { @@ -188,14 +190,18 @@ class ColorUtils { return hslc.withLightness((hslc.lightness + amt).clamp(0.0, 1.0)).toColor(); } - static Color parseHex(String value) => Color(int.parse(value.substring(1, 7), radix: 16) + 0xFF000000); + static Color parseHex(String value) => + Color(int.parse(value.substring(1, 7), radix: 16) + 0xFF000000); static Color blend(Color dst, Color src, double opacity) { return Color.fromARGB( 255, - (dst.red.toDouble() * (1.0 - opacity) + src.red.toDouble() * opacity).toInt(), - (dst.green.toDouble() * (1.0 - opacity) + src.green.toDouble() * opacity).toInt(), - (dst.blue.toDouble() * (1.0 - opacity) + src.blue.toDouble() * opacity).toInt(), + (dst.red.toDouble() * (1.0 - opacity) + src.red.toDouble() * opacity) + .toInt(), + (dst.green.toDouble() * (1.0 - opacity) + src.green.toDouble() * opacity) + .toInt(), + (dst.blue.toDouble() * (1.0 - opacity) + src.blue.toDouble() * opacity) + .toInt(), ); } }