Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

fix: Generalized Color Format (#2221)

Aman Negi4d56b42b8360
diff --git a/frontend/appflowy_flutter/lib/plugins/database_view/board/presentation/board_page.dart b/frontend/appflowy_flutter/lib/plugins/database_view/board/presentation/board_page.dart
index 24c30a0cd3..ebd1137364 100644
--- a/frontend/appflowy_flutter/lib/plugins/database_view/board/presentation/board_page.dart
+++ b/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) {
diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/widgets/emoji_picker/src/models/category_models.dart b/frontend/appflowy_flutter/lib/workspace/presentation/widgets/emoji_picker/src/models/category_models.dart
index 8d59fa87e7..885ff2ab0c 100644
--- a/frontend/appflowy_flutter/lib/workspace/presentation/widgets/emoji_picker/src/models/category_models.dart
+++ b/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
diff --git a/frontend/appflowy_flutter/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/models/category_models.dart b/frontend/appflowy_flutter/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/models/category_models.dart
index 8d59fa87e7..885ff2ab0c 100644
--- a/frontend/appflowy_flutter/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/models/category_models.dart
+++ b/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
diff --git a/frontend/appflowy_flutter/packages/flowy_infra/lib/colorscheme/dandelion.dart b/frontend/appflowy_flutter/packages/flowy_infra/lib/colorscheme/dandelion.dart
index c5ec13a48f..e169ef495a 100644
--- a/frontend/appflowy_flutter/packages/flowy_infra/lib/colorscheme/dandelion.dart
+++ b/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,