colordef and attribute issues

I don't quite understand how colordef works. Why is it 1000, and not something like 100? What do the numbers mean? I tried to produce gray with colordef gray = 500 500 500. And it said it was a bad color name.

I also tried black dim and dim black. Both resulted in a bad attribute error.

"gray" is not a valid color in MOC, use "grey" :)
<br /> colordef grey = 100 100 100<br />

The value's range (0-1000) is due to ncurses API to initialize colors.