As noted in the post found here: http://www.empirisoft.com/support/showthread.php?t=2853 - you wouldn't quite want to simply use the rand() function to specify what style is used; however there are other ways to approach this issue.

By utilizing the 'WGR' and 'BGR' functions, you can create a variety of trials that are randomized among each other. Each of these individual trials may be assigned to display the specified text in a specific color. Say green, red, blue, then yellow. You could repeat these four trials as a group four times, which would then leave you with 16 trials. Each of these trials could then be assigned a stimlist that contains a variety of words, such as 'green', 'red', 'blue', and 'yellow'. The stimlist could then be assigned to randomly select from this list and then present the text as a stimulus for the trial. Does this make sense?

You may also want to run through the samples that DirectRT comes with - as the stroop sample included may be able to assist you in making this experiment.