Add a box. Drop it on the ground. Then double-click the material and create a new material by clicking the bottom right NEW button.
Set the Mapping to Object-Parametric.
Set the highlight global intensity to 0%. You should now have a basic gray ball.
Go to the Colors tab and double-click the black to white gradient to choose another one. Choose the Red green blue from the Colorful collection.
Click the options button and change Preview Options to Cube
Then right-click (or control-click) on the Color Production preview to launch the function editor.
Click the Function Output Obsever button.
Now drag the small connector line upwards onto the Texture Map node. When it connects, a menu will popup, choose 'Grayscale Output'.
Notice the Preview window now shows the Green blue red gradient we set before.
Now click one of the rotate arrows on the Texture Map to rotate the direction of the gradient.
You're now ready to render your gradient. You can change it anytime by choosing or creating a new gradient in the color map of the Colors tab in the Advanced Material Editor.
If you need to change the direction of the texture, then just rotate the grayscale map in the function editor.