I am making a node group for a procedural texture, and want to create a node that has a setting that defines which color value to use, and can be toggled. basically the exact same thing as the switch node, but that doesn't exist in cycles material editor. Is there a way to do this?
Use a MixRGB Node, then as the inputs add two color values each with your desired color.
Then for the mix factor 0.0 will be the top most input, and 1.0 will be the bottom most input.
Anything in between will be a "mix" of those two colors (but if you want it to be one or the other, just use 0.0 & 1.0).
I just so happen to have created a custom Group Node that does precisely this. I found myself in a similar situation as yourself, although I needed to switch between more than two sources, so I put this together.
In this demonstration there are 10 different colors being sent into the switch node for convenient testing. You can easily see how the material's color changes when you type the corresponding channel number.
While I was at it I also created a 4-channel switch and a 2-channel switch (the 2-channel switch is admittedly redundant when you consider Rick Riggs' suggestion). You can pick whichever one suits you.
Inside the Group Node it looks like this:
This routing uses the principle of a "band-pass filter" to allow only values within a specific range through. By chopping a color ramp into ten equal bands of 10% at different places in the spectrum and assigning each to an input channel, we get a handy switch selector.