In my app there is a group chat where each user has it's own color on their name just like Whatsapp group chat. But there are times where the name color blends with the background color (e.g yellow user name on a white bubble chat) which makes it difficult for users to read.
Here is the code where I generate the color:
for(var item in json.decode(conversation!.idReceiversGroup!)){
if(!bubbleColor.map((e) => e.idUser).contains(item)){
bubbleColor.add(BubbleColor(idUser: item, Color: Colors.primaries[Random().nextInt(Colors.primaries.length)]));
}
}
Is there any solutions?