From 14569276a505698fb3283e9c8250143440b17e30 Mon Sep 17 00:00:00 2001 From: verity <80880870+verity0001@users.noreply.github.com> Date: Mon, 11 Nov 2024 19:48:18 +0100 Subject: [PATCH] Added more colors! Added more spider colors so you can see which spiders have dodged the most splatters. A list can be found below: 0 - Black - RGB(0, 0, 0) 1 - Blue - RGB(0, 0, 255) 5 - Green - RGB(0, 255, 0) 20 - Bright Yellow - RGB(255, 255, 0) 40 - Orange-Red - RGB(255, 140, 0) 100 - Neon Red - RGB(255, 0, 0) 200 - Neon Pink - RGB(255, 0, 255) 500 - Purple - RGB(114, 0, 255) 1,000 - Electric Cyan - RGB(0, 255, 255) 10,000 - Bright Gold - RGB(255, 202, 0) 50,000 - White - RGB(255, 255, 255) --- Spider.pde | 49 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/Spider.pde b/Spider.pde index fd04f1f..981f63a 100644 --- a/Spider.pde +++ b/Spider.pde @@ -61,15 +61,50 @@ class Spider{ } color getColor(){ int c = swattersSeen.size(); - if(c == 0 || c == 1){ + if(c == 0){ return color(0,0,0,255); - }else{ - if(c < 6){ - float fac = (c-1)/5.0; + } else { + if(c <= 5){ + float fac = c/5.0; return color(0,fac*140,255-fac*255,255); - }else{ - float fac = min(1,(c-6)/19.0); - return color(255*fac,140-fac*140,0,255); + } else { + if (c <= 20) { + float fac = (c-5)/15.0; + return color(fac*255, 140+fac*155, 0, 255); + } else { + if (c <= 40) { + float fac = (c-20)/20.0; + return color (255, 255-fac*115, 0, 255); + } else { + if ( c <= 100) { + float fac = (c-40)/60.0; + return color (255, 140-fac*140, 0, 255); + } else { + if (c <= 200) { + float fac = (c-100)/100.0; + return color (255, 0, fac*255, 255); + } else { + if (c <= 500) { + float fac = (c-200)/100.0; + return color (255-fac*141, 0, 255, 255); + } else { + if (c <= 1000) { + float fac = (c-500)/500.0; + return color (114-fac*114, fac*255,255, 255); + } else { + if (c <= 10000) { + float fac = (c-1000)/9000.0; + return color (fac*255, 255-fac*53, 255-fac*255); + } else { + float fac = min(1, (c-10000)/40000); + return color (255, 202+fac*53, fac*255); + } + } + } + } + } + } + } } } }