Skip to content

Commit

Permalink
Nicer-looking default dark mode filter
Browse files Browse the repository at this point in the history
  • Loading branch information
TechnicJelle committed Dec 19, 2024
1 parent af478f9 commit 2c43d60
Showing 1 changed file with 10 additions and 40 deletions.
50 changes: 10 additions & 40 deletions lib/src/layer/tile_layer/tile_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,11 @@ Widget darkModeTilesContainerBuilder(
) {
return ColorFiltered(
colorFilter: const ColorFilter.matrix(<double>[
-1,
0,
0,
0,
255,
0,
-1,
0,
0,
255,
0,
0,
-1,
0,
255,
0,
0,
0,
1,
0,
//Colors get Inverted and then Hue Rotated by 180 degrees
0.5740000009536743, -1.4299999475479126, -0.14399999380111694, 0, 255, //R
-0.4259999990463257, -0.429999977350235, -0.14399999380111694, 0, 255, //G
-0.4259999990463257, -1.4299999475479126, 0.8559999465942383, 0, 255, //B
0, 0, 0, 1, 0, //A
]),
child: tilesContainer,
);
Expand All @@ -46,26 +31,11 @@ Widget darkModeTileBuilder(
) {
return ColorFiltered(
colorFilter: const ColorFilter.matrix(<double>[
-1,
0,
0,
0,
255,
0,
-1,
0,
0,
255,
0,
0,
-1,
0,
255,
0,
0,
0,
1,
0,
//Colors get Inverted and then Hue Rotated by 180 degrees
0.5740000009536743, -1.4299999475479126, -0.14399999380111694, 0, 255, //R
-0.4259999990463257, -0.429999977350235, -0.14399999380111694, 0, 255, //G
-0.4259999990463257, -1.4299999475479126, 0.8559999465942383, 0, 255, //B
0, 0, 0, 1, 0, //A
]),
child: tileWidget,
);
Expand Down

0 comments on commit 2c43d60

Please sign in to comment.