Posts ID:154207 Favorites Creations
 ID:154207   Apr 5 2002, 2:10 pm Does anyone know how to find the perceptual brightness of an RGB color? I've been searching the net, but most sites don't bother with any formulae. The ones that do, are a bit over my head and I really don't feel like studying so much color theory for a simple proc that isn't pivotal to my game.
 #1 Apr 5 2002, 3:21 pm I would love to help you.... but I can't lol. This would be very useful for me to. Asusming that your RGB proc sometimes leaves icons too bright.
 #2 Apr 5 2002, 4:45 pm Shadowdarke wrote: Does anyone know how to find the perceptual brightness of an RGB color? I've been searching the net, but most sites don't bother with any formulae. The ones that do, are a bit over my head and I really don't feel like studying so much color theory for a simple proc that isn't pivotal to my game. I do know that lime green 0,255,0 appears to be the brightest colour, followed by bright red 255,0,0 , followed by full blue 0,0,255. I don't know individual combinations -- I usually just eyeball them. I'm guessing, in your case, you want to have a minimum and maximum brightness level for users' custom colour selections using the rgb() proc. (For Darke Dungeon? Please say it is! =)) My advice would be to set up a large variety of colours yourself and only allow people to select from those. The best hexadecimals that you can use are the following: 00, 33, 66, 99, CC, FF and their decimal counterparts: 0, 51, 102, 153, 204, 255 These are almost guaranteed to look different for every colour. Thus, CCCCFF will look very different from 99CCFF when the two are compared. It's possible to make a mistake if you're making a very quick glance, but otherwise the differences are notable enough not to cause problems.
 #3 Apr 5 2002, 7:57 pm In response to Spuzzum (#2) Spuzzum wrote: I do know that lime green 0,255,0 appears to be the brightest colour, followed by bright red 255,0,0 , followed by full blue 0,0,255. I don't know individual combinations -- I usually just eyeball them. The problem comes when including mixed colors. Magenta (#FF00FF) should register about the same as red (#FF0000). I can't just use the max of the 3 color components, because then pale yellow (#FFFF99) will be the same as yellow (#FFFF00) or even blue (#0000FF), which as you noted looks darker than other FF level colors. Maybe I could average the max and min values of the RGB value set, and weight it slightly so that green is worth more than red which in turn is worth more than blue. White would be 255. Magenta, red, blue, green, yellow, and cyan would be around 128. Pale yellow would be 204. Now the trouble comes when the mid range value is different. Are #FFCC99 and #FF99CC close enough in brightness to count the same? I guess that depends on the amount I weight red versus green versus blue. I'm guessing, in your case, you want to have a minimum and maximum brightness level for users' custom colour selections using the rgb() proc. (For Darke Dungeon? Please say it is! =)) Yes, that's the reason. It's not for DD though. I got a touch of Spuzzitis and started another project that I'm going to keep quiet for a while. Any color manipulations I work out for this project will certainly improve the quality of Darke Dungeon though. ;) My advice would be to set up a large variety of colours yourself and only allow people to select from those. The best hexadecimals that you can use are the following: 00, 33, 66, 99, CC, FF I agree. Offsets of of 33 hex make very good distinctions between colors. Right now the system is based on 11 hex giving 16 degrees of color for each component, but if it proves a problem I'll probably change it to 33 hex. 33 still provides plenty of variety with less chance of color confusion.
 #4 Apr 5 2002, 8:12 pm In response to Shadowdarke (#3) Wow.All I have to say is that you guys are good at colors.Wow. -Kappa the Imp
 ```gray = round((r*30 + g*59 + b*11)/100,1) ```