HEX-/RGB-colors in Terminal

You can specify the colors as RGB from the second tab of the color picker:

You can specify a color as a hex code by installing Hex Color Picker.