fix color randomization (10x @erik_hedvall!)

This commit is contained in:
🪞👃🪞 2024-10-11 20:05:43 +03:00
parent 7c9b41e3af
commit e20f195c20
4 changed files with 10 additions and 12 deletions

View file

@ -121,7 +121,7 @@ impl Handle<Tui> for PhrasePool<Tui> {
},
key!(KeyCode::Char('d')) => { // insert duplicate
let mut phrase = (*self.phrases[self.phrase].read().unwrap()).clone();
phrase.color = random_color_near(phrase.color, 0.1);
phrase.color = random_color_near(phrase.color, 0.2);
self.phrases.insert(self.phrase + 1, Arc::new(RwLock::new(phrase)));
self.phrase += 1;
},