lemmur-app-android/lib/util/text_color.dart

10 lines
196 B
Dart
Raw Normal View History

import 'package:flutter/material.dart';
Color textColorBasedOnBackground(Color color) {
if (color.computeLuminance() > 0.5) {
return Colors.black;
} else {
return Colors.white;
}
}