The GTA: San Andreas carcols.dat is the same as in the other Grand Theft Autos. You can edit it with the
X Car Color Editor. You can download X Car Color Editor here.
For editing with Notepad;
Each number has its own color;
GTA: San Andreas Carcolors.
How to edit;
This is incredibly simple. To begin with, you must come up with an RGB code that matches the colour you want a car to spawn as. As explained earlier, choose any number between 0 and 255 for each 3 values. If you choose 255,0,0 you will have the strongest red colour possible. Now in the COL section, add a new line at the bottom, and give it a # number that follows on from the very last colour. Make sure your new line does not have the same # number as any other line. Once you have your new line ready, you can add a name for it on the right, similar to the other lines, but this is not necessary. You have now finished with the COL section. Now we move onto the CAR and CAR4 sections. Find the vehicle you want your new colour(s) to apply to. This vehicle should already have one or more pairs assigned to it. You can either remove these, or add your new pair to the end. Whichever you choose will make no difference, but don't forget; The last number of the car's line must not have a comma ending it. A pair can also have the same colour in it twice, all this will do is match the primary and secondary colours together. Remember, many cars only make use of the primary colour in a pair - the dff model file will need editing if you want the secondary colour to function somewhere on a car. The secondary colour (and perhaps tertiary and quaternary if using CAR4) can be set to anything should the model not actually have any materials assigned to those values.
Note: In San Andreas, having more than 179 colors will crash the game.
Source: GTAModding.com - More information about carcols.dat