I want to give multiple colors to different features within a shapefile based on attribute values , is this possible in QGIS ?
If yes what is the procedure ?
Is there a way to provide color by means of hexadecimal codes ?
if I understood you right this great tutorial should answer your question: http://woostuff.wordpress.com/2011/06/06/one-of-my-favorite-features-of-qgis/
p.s. from the same author there is also a follow-up: http://woostuff.wordpress.com/2012/01/25/improvements-to-the-qgis-rule-based-rendering/
Alternatively to categorized styling, if you want to play a bit with colour you can try to code it by yourself:
CASE WHEN Field = 'Value1' THEN color_rgb(0, 176, 80) WHEN Field = 'Value2' THEN color_rgb(255, 255, 0) WHEN Field = 'Value3' THEN color_rgb(255, 192, 0) WHEN Field = 'Value4' THEN color_rgb(255, 0, 0) WHEN Field = 'Value5' THEN color_rgb(192, 0, 0) WHEN Field = 'Value6' THEN color_rgb(255, 0, 255) ... ELSE color_rgb(0, 0, 0) END
You can also apply rand function inside color_rgb