Firstly, yes the colour is hardcoded in SH3. That doesn't mean you can't work around it. If you want black lines all the time, just add said black lines to Periscope.tga (I mean literally draw them in the scope view exactly where the green lines are in the game) and you're done.
Secondly, it may interest you to know that the real U-boats
did have the glowing green lines. I originally planned to include black lines in the OLC GUI until I found out that the green ones are actually historically accurate!
HTH
OLC