New pallette!

This commit is contained in:
Andrew 2023-03-05 19:14:18 +07:00
parent 8a586f0fe6
commit 57004048e5
3 changed files with 555 additions and 248 deletions

View file

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:huacu_mobile/game_pallete.dart';
import 'package:styled_widget/styled_widget.dart';
class StaticColorPlate extends StatelessWidget {
final String plateName;
@ -26,6 +27,15 @@ class StaticColorPlate extends StatelessWidget {
),
borderRadius: BorderRadius.circular(10),
),
alignment: Alignment.center,
child: Text(plateName)
// .textColor( // NOTE: This is much simpler
// pallete[plateName]!.computeLuminance() > 0.5
// ? Colors.black
// : Colors.white,
// )
.textColor(labelColorForComputedLightness[plateName])
.fontSize(24),
);
}
}