Monday, December 14, 2009

Let there be color (and a request for help)...


I just finished implementing something that didn't take that long, and was long overdue. Color. I'll let the screenshot speak for itself.



The amount of code it took to add this was almost non-existent.

The issue is that I don't have an eye for color. There's a good reason my wife picked out our room colors. Here's what I have so far:

case TerrainType.Floor:
    if (visible)
        return Color.FromRGB(42, 42, 42);
    else
        return Color.FromRGB(15, 15, 15);
case TerrainType.Wall:
    if (visible)
        return Color.FromRGB(83, 41, 0);
    else
        return Color.FromRGB(40, 20, 0); 

If anyone wants to play around with the color scheme in paint (or download the sourcecode and build) and comes up with something that looks better, let me know. I'd love to use something better than what I came up with.

3 comments:

jice said...

Hey it doesn't look that bad ! A very good start :)

Could you externalize the colors in some config file so that we can play with them without having to figure out how to compile a C# projet !
You should also put the default foreground/background colors for the UI in this file so that we can experiment and improve those white on black dialogs :D

donblas said...

Good call on config file, that should be easy. I'll work on getting all colors out of magecrawl :).

droid factorial said...

It must be true that programmers suck at picking colors. The linked article references a Nasa UI design article and an applet that uses the Munsel color space.

When I had to pick colors, I was using curses (a version with 16 fixed colors) and so just picked 2 dark colors for the background, used everything else as foreground, then looked at all combinations to see which ones were unusable. Got everything I needed except for medkits which are red on white.