@@ -42,6 +42,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
4242 colorDirectMentionBackground: const HSLColor .fromAHSL (0.2 , 240 , 0.7 , 0.7 ).toColor (),
4343 colorGlobalTimeBackground: const HSLColor .fromAHSL (1 , 0 , 0 , 0.93 ).toColor (),
4444 colorGlobalTimeBorder: const HSLColor .fromAHSL (1 , 0 , 0 , 0.8 ).toColor (),
45+ colorLink: const HSLColor .fromAHSL (1 , 200 , 1 , 0.4 ).toColor (),
4546 colorMathBlockBorder: const HSLColor .fromAHSL (0.15 , 240 , 0.8 , 0.5 ).toColor (),
4647 colorMessageMediaContainerBackground: const Color .fromRGBO (0 , 0 , 0 , 0.03 ),
4748 colorPollNames: const HSLColor .fromAHSL (1 , 0 , 0 , .45 ).toColor (),
@@ -75,6 +76,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
7576 colorDirectMentionBackground: const HSLColor .fromAHSL (0.25 , 240 , 0.52 , 0.6 ).toColor (),
7677 colorGlobalTimeBackground: const HSLColor .fromAHSL (0.2 , 0 , 0 , 0 ).toColor (),
7778 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
7880 colorMathBlockBorder: const HSLColor .fromAHSL (1 , 240 , 0.4 , 0.4 ).toColor (),
7981 colorMessageMediaContainerBackground: const HSLColor .fromAHSL (0.03 , 0 , 0 , 1 ).toColor (),
8082 colorPollNames: const HSLColor .fromAHSL (1 , 236 , .15 , .7 ).toColor (),
@@ -107,6 +109,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
107109 required this .colorDirectMentionBackground,
108110 required this .colorGlobalTimeBackground,
109111 required this .colorGlobalTimeBorder,
112+ required this .colorLink,
110113 required this .colorMathBlockBorder,
111114 required this .colorMessageMediaContainerBackground,
112115 required this .colorPollNames,
@@ -139,6 +142,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
139142 final Color colorDirectMentionBackground;
140143 final Color colorGlobalTimeBackground;
141144 final Color colorGlobalTimeBorder;
145+ final Color colorLink;
142146 final Color colorMathBlockBorder; // TODO(#46) this won't be needed
143147 final Color colorMessageMediaContainerBackground;
144148 final Color colorPollNames;
@@ -199,6 +203,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
199203 Color ? colorDirectMentionBackground,
200204 Color ? colorGlobalTimeBackground,
201205 Color ? colorGlobalTimeBorder,
206+ Color ? colorLink,
202207 Color ? colorMathBlockBorder,
203208 Color ? colorMessageMediaContainerBackground,
204209 Color ? colorPollNames,
@@ -221,6 +226,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
221226 colorDirectMentionBackground: colorDirectMentionBackground ?? this .colorDirectMentionBackground,
222227 colorGlobalTimeBackground: colorGlobalTimeBackground ?? this .colorGlobalTimeBackground,
223228 colorGlobalTimeBorder: colorGlobalTimeBorder ?? this .colorGlobalTimeBorder,
229+ colorLink: colorLink ?? this .colorLink,
224230 colorMathBlockBorder: colorMathBlockBorder ?? this .colorMathBlockBorder,
225231 colorMessageMediaContainerBackground: colorMessageMediaContainerBackground ?? this .colorMessageMediaContainerBackground,
226232 colorPollNames: colorPollNames ?? this .colorPollNames,
@@ -250,6 +256,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
250256 colorDirectMentionBackground: Color .lerp (colorDirectMentionBackground, other.colorDirectMentionBackground, t)! ,
251257 colorGlobalTimeBackground: Color .lerp (colorGlobalTimeBackground, other.colorGlobalTimeBackground, t)! ,
252258 colorGlobalTimeBorder: Color .lerp (colorGlobalTimeBorder, other.colorGlobalTimeBorder, t)! ,
259+ colorLink: Color .lerp (colorLink, other.colorLink, t)! ,
253260 colorMathBlockBorder: Color .lerp (colorMathBlockBorder, other.colorMathBlockBorder, t)! ,
254261 colorMessageMediaContainerBackground: Color .lerp (colorMessageMediaContainerBackground, other.colorMessageMediaContainerBackground, t)! ,
255262 colorPollNames: Color .lerp (colorPollNames, other.colorPollNames, t)! ,
@@ -1029,8 +1036,7 @@ class _InlineContentBuilder {
10291036 assert (recognizer != null );
10301037 _pushRecognizer (recognizer);
10311038 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));
10341040 _popRecognizer ();
10351041 return result;
10361042
0 commit comments