|
@@ -6,7 +6,7 @@ import 'package:crypto/crypto.dart';
|
|
|
class ColorUtil {
|
|
|
static Color generateColor(String uuid) {
|
|
|
final hash = sha256.convert(utf8.encode(uuid)).toString();
|
|
|
- final intHash = int.parse(hash.substring(hash.length - 8), radix: 16);
|
|
|
+ final intHash = int.parse(hash.substring(hash.length - 10), radix: 16);
|
|
|
final Random random = Random(intHash);
|
|
|
final double r = random.nextInt(256).toDouble();
|
|
|
final double g = random.nextInt(256).toDouble();
|