feat: add new purple theme (#1693)

* feat: add new purple theme

* refactor: change theme color

* fix: contrast issue

* refactor: change the primary btn color
This commit is contained in:
Mayur Mahajan 2023-02-12 18:19:02 -08:00 committed by GitHub
parent 2f803959e7
commit 9c8753b191
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 82 additions and 0 deletions

View File

@ -62,6 +62,7 @@ class ThemeSetting extends StatelessWidget {
children: [
_themeItemButton(context, BuiltInTheme.light),
_themeItemButton(context, BuiltInTheme.dandelion),
_themeItemButton(context, BuiltInTheme.lavender),
],
),
);

View File

@ -1,3 +1,4 @@
import 'package:flowy_infra/colorscheme/lavender.dart';
import 'package:flutter/material.dart';
import 'package:flowy_infra/theme.dart';
@ -8,6 +9,7 @@ import 'dandelion.dart';
///
/// The key is the theme name, and the value is a list of two color schemes:
/// the first is for light mode, and the second is for dark mode.
const Map<String, List<FlowyColorScheme>> themeMap = {
BuiltInTheme.light: [
DefaultColorScheme.light(),
@ -17,6 +19,10 @@ const Map<String, List<FlowyColorScheme>> themeMap = {
DandelionColorScheme.light(),
DandelionColorScheme.dark(),
],
BuiltInTheme.lavender: [
LavenderColorScheme.light(),
LavenderColorScheme.dark(),
],
};
@immutable

View File

@ -0,0 +1,74 @@
import 'package:flutter/material.dart';
import 'colorscheme.dart';
const _black = Color(0xff000000);
const _white = Color(0xFFFFFFFF);
class LavenderColorScheme extends FlowyColorScheme {
const LavenderColorScheme.light()
: super(
surface: Colors.white,
hover: const Color(0xFFe0f8ff),
selector: const Color(0xfff2fcff),
red: const Color(0xfffb006d),
yellow: const Color(0xffffd667),
green: const Color(0xff66cf80),
shader1: const Color(0xff333333),
shader2: const Color(0xff4f4f4f),
shader3: const Color(0xff828282),
shader4: const Color(0xffbdbdbd),
shader5: const Color(0xffe0e0e0),
shader6: const Color(0xfff2f2f2),
shader7: const Color(0xffffffff),
bg1: const Color(0xffAC59FF),
bg2: const Color(0xffedeef2),
bg3: const Color(0xffe2e4eb),
bg4: const Color(0xff2c144b),
tint1: const Color(0xffe8e0ff),
tint2: const Color(0xffffe7fd),
tint3: const Color(0xffffe7ee),
tint4: const Color(0xffffefe3),
tint5: const Color(0xfffff2cd),
tint6: const Color(0xfff5ffdc),
tint7: const Color(0xffddffd6),
tint8: const Color(0xffdefff1),
tint9: const Color(0xffe1fbff),
main1: const Color(0xffA652FB),
main2: const Color(0xff9327FF),
shadow: _black,
);
const LavenderColorScheme.dark()
: super(
surface: const Color(0xFF1B1A1D),
hover: const Color(0xff1f1f1f),
selector: const Color(0xff333333),
red: const Color(0xfffb006d),
yellow: const Color(0xffffd667),
green: const Color(0xff66cf80),
shader1: _white,
shader2: const Color(0xffffffff),
shader3: const Color(0xff828282),
shader4: const Color(0xffbdbdbd),
shader5: _white,
shader6: _black,
shader7: _black,
bg1: const Color(0xff8C23F6),
bg2: _black,
bg3: const Color(0xff4f4f4f),
bg4: const Color(0xff2c144b),
tint1: const Color(0xffc3adff),
tint2: const Color(0xffffadf9),
tint3: const Color(0xffffadad),
tint4: const Color(0xffffcfad),
tint5: const Color(0xfffffead),
tint6: const Color(0xffe6ffa3),
tint7: const Color(0xffbcffad),
tint8: const Color(0xffadffe2),
tint9: const Color(0xffade4ff),
main1: const Color(0xffA652FB),
main2: const Color(0xff9327FF),
shadow: _black,
);
}

View File

@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
class BuiltInTheme {
static const String light = 'light';
static const String dandelion = 'dandelion';
static const String lavender = 'lavender';
}
class AppTheme {