changed everything from filcnaplo to refilc finally

This commit is contained in:
Kima
2024-02-24 20:12:25 +01:00
parent 0d1c7b7143
commit 1171e3aaaf
655 changed files with 38728 additions and 44967 deletions

View File

@@ -0,0 +1,15 @@
import 'package:flutter/material.dart';
class ColorUtils {
static Color stringToColor(String str) {
int hash = 0;
for (var i = 0; i < str.length; i++) {
hash = str.codeUnitAt(i) + ((hash << 5) - hash);
}
return HSLColor.fromAHSL(1, hash % 360, .8, .75).toColor();
}
static Color foregroundColor(Color color) =>
color.computeLuminance() >= .5 ? Colors.black : Colors.white;
}