소스 검색

fix: Generalized Color Format (#2221)

Aman Negi 2 년 전
부모
커밋
4d56b42b83

+ 2 - 11
frontend/appflowy_flutter/lib/plugins/database_view/board/presentation/board_page.dart

@@ -80,8 +80,8 @@ class _BoardContentState extends State<BoardContent> {
   late AppFlowyBoardScrollController scrollManager;
   final cardConfiguration = CardConfiguration<String>();
 
-  final config = AppFlowyBoardConfig(
-    groupBackgroundColor: HexColor.fromHex('#F7F8FC'),
+  final config = const AppFlowyBoardConfig(
+    groupBackgroundColor: Color(0xffF7F8FC),
   );
 
   @override
@@ -349,15 +349,6 @@ class _ToolbarBlocAdaptor extends StatelessWidget {
   }
 }
 
-extension HexColor on Color {
-  static Color fromHex(String hexString) {
-    final buffer = StringBuffer();
-    if (hexString.length == 6 || hexString.length == 7) buffer.write('ff');
-    buffer.write(hexString.replaceFirst('#', ''));
-    return Color(int.parse(buffer.toString(), radix: 16));
-  }
-}
-
 Widget? _buildHeaderIcon(GroupData customData) {
   Widget? widget;
   switch (customData.fieldType) {

+ 2 - 2
frontend/appflowy_flutter/lib/workspace/presentation/widgets/emoji_picker/src/models/category_models.dart

@@ -25,8 +25,8 @@ class CategoryIcon {
   /// Icon of Category
   const CategoryIcon({
     required this.icon,
-    this.color = const Color.fromRGBO(211, 211, 211, 1),
-    this.selectedColor = const Color.fromRGBO(178, 178, 178, 1),
+    this.color = const Color(0xffd3d3d3),
+    this.selectedColor = const Color(0xffb2b2b2),
   });
 
   /// The icon to represent the category

+ 2 - 2
frontend/appflowy_flutter/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/models/category_models.dart

@@ -25,8 +25,8 @@ class CategoryIcon {
   /// Icon of Category
   const CategoryIcon({
     required this.icon,
-    this.color = const Color.fromRGBO(211, 211, 211, 1),
-    this.selectedColor = const Color.fromRGBO(178, 178, 178, 1),
+    this.color = const Color(0xffd3d3d3),
+    this.selectedColor = const Color(0xffb2b2b2),
   });
 
   /// The icon to represent the category

+ 2 - 2
frontend/appflowy_flutter/packages/flowy_infra/lib/colorscheme/dandelion.dart

@@ -51,7 +51,7 @@ class DandelionColorScheme extends FlowyColorScheme {
           tint8: const Color(0xffdefff1),
           tint9: _lightTint9,
           main1: _lightMain1,
-          main2: const Color.fromARGB(255, 224, 25, 111),
+          main2: const Color(0xffe0196f),
           shadow: _black,
           sidebarBg: _lightBg1,
           divider: _lightShader6,
@@ -99,7 +99,7 @@ class DandelionColorScheme extends FlowyColorScheme {
           tint8: const Color(0xff00F0E2),
           tint9: const Color(0xff00BCF0),
           main1: _darkMain1,
-          main2: const Color.fromARGB(255, 224, 25, 111),
+          main2: const Color(0xffe0196f),
           shadow: _black,
           sidebarBg: const Color(0xff232B38),
           divider: _darkShader3,