Well let's see, you either:
- Have a texture that you made or downloaded, and supply it to the GPU
Generate a texture on the CPU and supply it to GPU for use in exactly the same was as above; generation can occur either before your program runs, or when it runs
Don't use textures; detail may be achieved by combining vertex colouring and geometry
Image generation is a whole separate field, which is why you do not see it in many games. The closest related fields in games are procedural generation and screen space / pixel shader effects (though modification that takes place here is not on the same order of complexity as generation).
is that the way to go
...for what? How can we answer if we don't know what you're trying to achieve? There are many reasons to use a generated texture, and more reasons not to, but we don't know which apply to you.