Place colored line as texture I am trying to create a folded paper like object using Blender. This is something I've created. Now, I want to color edges of the paper and the creases of the fold. Like if the crease is downwards I want a green color line along that and if it is upwards the color should be red. Moreover, I want the edges to be colored as black line. Can anyone suggest any ideas about achieving this? 
Actually I am creating thousands of random pages like this using a python script. So it's not possible to manually label each of those. I need to find out an automatic process using a script. For this one the page should have this kind of markings. 

Any ideas for this would be great. Thanks in advance!
You can achieve this using freestyle:


In your render properties tab, at the very bottom, activate freestyle.
Then go to the render layers tab and scroll down to the freestyle settings.
For every line style you want to display, you have to create a separate line set. For every set you can set a number of options.
To color the outer border of the paper black, check "Silhouette" and "Border" and create a line style with black color underneath
For showing creases, adjust the angle settings of a line set.


More information can be found here:

Introduction to freestyle:
https://www.blender.org/manual/render/freestyle/introduction.html

Line set settings:
https://www.blender.org/manual/render/freestyle/parameter_editor/line_set.html

Modifiers - you can even color by crease angle:
https://www.blender.org/manual/render/freestyle/parameter_editor/line_style/index.html

Also take a look at this page - there are a number of dense, but very informational articles and infographics about freestyle:
http://blendernpr.org

If you save the line styles and sets in a blender file, you won't even have to script all this, just enable it and run your script.