Types are referred to with classes such as FloatNode, Vec3Node, Mat4Node, etc. Although these can be instantiated, a nicer way that is less verbose making it easier to read and more similar to GLSL syntax is to use their respective creator functions float or vec3 as will be illustrated for each type below.
These types have methods to support logical and arithmetic operators in GLSL such as + - / * && ||. Typescript types ensure that you can not not for example multiply a 3-component vector with a 4x4 matrix so you can quickly discover bugs in your code.
The higher dimensional vectors have the same functionality as a 2-component vector as described above. Their individual components can be extracted with .x, .y, .z, and .w for their respective first, second, third and fourth components.
These also have additional methods beyond their equivalents of Vec2Node.
Colors are represented using the types RgbNode and RgbaNode, where the latter has an alpha component for transparency. These inherit from Vec3Node and Vec4Node respectively so any RgbNode or RgbaNode is a valid Vec3Node or Vec4Node. The reason for this is to make the code easier to understand as it makes it clear what is supposed to represent a color. These types also have methods for extracting the RGBA components which are just wrapping the methods to extract XYZW components from the vector parent class.
RGB
The color can be passed in as a hexadecimal value, string or a THREE.Color instance.
A Vec3Node or RgbNode can be used to represent the color for rgba.
A Vec4Node can be used to represent the color and transparency for rgba.
The transparency (alpha channel) can be defined by a constant number
The transparency can also be defined with a FloatNode instance which can be used to control the transparency programaticaly.
Matrices
At the moment, no creator methods exist beyond the constructors of the matrix type node implementations. Most of the time, you don't instantiate these yourself but instead get them from uniforms or attributes.