-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.ts
50 lines (44 loc) · 1.11 KB
/
theme.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
* theme.ts of project stock-chart
* @date 2022/8/18 11:37
* @author 阿佑[[email protected]]
*/
export type Color = string | CanvasGradient | CanvasPattern
export const BLACK = '#000'
export const WHITE = '#fff'
export const GRAY = '#D7DDE1'
export const NONE = 'rgba(0, 0, 0, 0)'
export type ThemeOptions = {
color: Color;
background: Color;
mountainColor: Color;
dashedColor: Color;
dottedColor: Color;
primaryColor: Color;
bullishColor: Color; // 看多颜色
bullishBg: Color;
bearishBg: Color;
bearishColor: Color;
lineWidth: number;
dashWidth: number;
dashArray: number[];
dotArray: number[];
fontSize: number;
}
export const themeOptions: ThemeOptions = {
fontSize: 10,
lineWidth: 0.5,
dashWidth: 0.5,
dashArray: [4, 4],
dotArray: [2, 2],
bullishColor: '#00B167', // 看多颜色
bearishColor: '#F24A3A',
bullishBg: 'rgba(0, 177, 103, 0.1)', // 看多颜色
bearishBg: 'rgba(242, 74, 58, 0.1)',
color: BLACK,
background: 'rgba(0, 0, 0, 0.1)',
dashedColor: '#FCE9D6',
dottedColor: '#F19231',
primaryColor: '#326BFE',
mountainColor: '#E6EDFE',
}