@@ -42,6 +42,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
42
42
colorDirectMentionBackground: const HSLColor .fromAHSL (0.2 , 240 , 0.7 , 0.7 ).toColor (),
43
43
colorGlobalTimeBackground: const HSLColor .fromAHSL (1 , 0 , 0 , 0.93 ).toColor (),
44
44
colorGlobalTimeBorder: const HSLColor .fromAHSL (1 , 0 , 0 , 0.8 ).toColor (),
45
+ colorLink: const HSLColor .fromAHSL (1 , 200 , 1 , 0.4 ).toColor (),
45
46
colorMathBlockBorder: const HSLColor .fromAHSL (0.15 , 240 , 0.8 , 0.5 ).toColor (),
46
47
colorMessageMediaContainerBackground: const Color .fromRGBO (0 , 0 , 0 , 0.03 ),
47
48
colorPollNames: const HSLColor .fromAHSL (1 , 0 , 0 , .45 ).toColor (),
@@ -75,6 +76,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
75
76
colorDirectMentionBackground: const HSLColor .fromAHSL (0.25 , 240 , 0.52 , 0.6 ).toColor (),
76
77
colorGlobalTimeBackground: const HSLColor .fromAHSL (0.2 , 0 , 0 , 0 ).toColor (),
77
78
colorGlobalTimeBorder: const HSLColor .fromAHSL (0.4 , 0 , 0 , 0 ).toColor (),
79
+ colorLink: const HSLColor .fromAHSL (1 , 200 , 1 , 0.4 ).toColor (), // the same as light in Web
78
80
colorMathBlockBorder: const HSLColor .fromAHSL (1 , 240 , 0.4 , 0.4 ).toColor (),
79
81
colorMessageMediaContainerBackground: const HSLColor .fromAHSL (0.03 , 0 , 0 , 1 ).toColor (),
80
82
colorPollNames: const HSLColor .fromAHSL (1 , 236 , .15 , .7 ).toColor (),
@@ -107,6 +109,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
107
109
required this .colorDirectMentionBackground,
108
110
required this .colorGlobalTimeBackground,
109
111
required this .colorGlobalTimeBorder,
112
+ required this .colorLink,
110
113
required this .colorMathBlockBorder,
111
114
required this .colorMessageMediaContainerBackground,
112
115
required this .colorPollNames,
@@ -139,6 +142,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
139
142
final Color colorDirectMentionBackground;
140
143
final Color colorGlobalTimeBackground;
141
144
final Color colorGlobalTimeBorder;
145
+ final Color colorLink;
142
146
final Color colorMathBlockBorder; // TODO(#46) this won't be needed
143
147
final Color colorMessageMediaContainerBackground;
144
148
final Color colorPollNames;
@@ -199,6 +203,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
199
203
Color ? colorDirectMentionBackground,
200
204
Color ? colorGlobalTimeBackground,
201
205
Color ? colorGlobalTimeBorder,
206
+ Color ? colorLink,
202
207
Color ? colorMathBlockBorder,
203
208
Color ? colorMessageMediaContainerBackground,
204
209
Color ? colorPollNames,
@@ -221,6 +226,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
221
226
colorDirectMentionBackground: colorDirectMentionBackground ?? this .colorDirectMentionBackground,
222
227
colorGlobalTimeBackground: colorGlobalTimeBackground ?? this .colorGlobalTimeBackground,
223
228
colorGlobalTimeBorder: colorGlobalTimeBorder ?? this .colorGlobalTimeBorder,
229
+ colorLink: colorLink ?? this .colorLink,
224
230
colorMathBlockBorder: colorMathBlockBorder ?? this .colorMathBlockBorder,
225
231
colorMessageMediaContainerBackground: colorMessageMediaContainerBackground ?? this .colorMessageMediaContainerBackground,
226
232
colorPollNames: colorPollNames ?? this .colorPollNames,
@@ -250,6 +256,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
250
256
colorDirectMentionBackground: Color .lerp (colorDirectMentionBackground, other.colorDirectMentionBackground, t)! ,
251
257
colorGlobalTimeBackground: Color .lerp (colorGlobalTimeBackground, other.colorGlobalTimeBackground, t)! ,
252
258
colorGlobalTimeBorder: Color .lerp (colorGlobalTimeBorder, other.colorGlobalTimeBorder, t)! ,
259
+ colorLink: Color .lerp (colorLink, other.colorLink, t)! ,
253
260
colorMathBlockBorder: Color .lerp (colorMathBlockBorder, other.colorMathBlockBorder, t)! ,
254
261
colorMessageMediaContainerBackground: Color .lerp (colorMessageMediaContainerBackground, other.colorMessageMediaContainerBackground, t)! ,
255
262
colorPollNames: Color .lerp (colorPollNames, other.colorPollNames, t)! ,
@@ -1029,8 +1036,7 @@ class _InlineContentBuilder {
1029
1036
assert (recognizer != null );
1030
1037
_pushRecognizer (recognizer);
1031
1038
final result = _buildNodes (node.nodes,
1032
- // Web has the same color in light and dark mode.
1033
- style: TextStyle (color: const HSLColor .fromAHSL (1 , 200 , 1 , 0.4 ).toColor ()));
1039
+ style: TextStyle (color: ContentTheme .of (_context! ).colorLink));
1034
1040
_popRecognizer ();
1035
1041
return result;
1036
1042
0 commit comments