MS20426 (flush head) and MS20470 (universal head) rivets specify the following:
Finish: Chemical surface treatment MIL-C-5541 Class 1A, yellow. Also, see procurement specification Anodize MIL-A-8625 Type II Class 1, clear is specified on aluminum alloys 1100, 2017 (most common for our airplanes), 2219, 5056 and 7050 rivets by adding the letter 'A' following the last digit of the dash number.
MIL-C-5541 specifies:
Scope: This specification covers the requirements for two classes of chemical conversion coatings formed by the reaction of chemical conversion materials and the surfaces of aluminum and aluminum alloys ... The coating also provides a surface having better paint adhesion than uncoated aluminum.
Class 1A - For maximum protection against corrosion, for surfaces to be painted or left unpainted.
So for a typical rivet part number MS20426AD3-3, there is no 'A' following the last digit of the dash number, so the finish is not anodized. Therefore the finish is per MIL-C-5541 which is a conversion coating (ie. Alodine) which is compatible with paint. No preparation prior to paint is required except to clean to ensure no oils or contaminants are present.