They may have used colored tracer rounds for some of the smaller AA guns like 40mm and 20mm guns (just like we did) but as the OP claimed, AA flak guns didn't use colored rounds.
You are partial correct, I just read up on it - they used Dye in the Primary and Secondary armaments to Adjust distance (It wasn't flak all together, rather it was large caliber weapons for aiming purposes). Against TBD's this makes sense.
The Japanese did fire main batteries against the TBD's, an 8 inch shell explosion in front of a torpedo plane is known to take a plane down with it; its referenced numerous times in the solomon's campaign.
We used Dye as well - here's an example:
Soon after being torpedoed, Atlanta was then hit by an estimated nineteen 8-inch (200 mm) shells when San Francisco, "in the urgency of battle, darkness, and confused intermingling of friend or foe", fired at her. Though almost all of the shells passed through the thin skin of the ship without detonating, scattering green dye, fragments from their impact killed many men, including Admiral Scott and members of his staff. Atlanta prepared to return fire on her new assailant, but San Francisco's own gun flashes disclosed a distinctly "non-Japanese hull profile" that resulted in a suspension of those efforts. San Francisco's shells, which passed high through Atlanta's superstructure, may have been intended for a Japanese target further beyond her from San Francisco's perspective.
Another example of the Japanese:
The purpose of the colored dye was so each ship could distinguish which splashes were theirs so they could adjust their aim accordingly.
It wasn't related to AAA at all, in fact the colored smashes at Midway were the main batteries firing on TBD Devestators to help the fighters locate them; obviously all the Japanese fighters swarmed down to the Dye which was highly visible from air to attack the TBD's. The colored dye was mentioned in Shattered Sword, and The Last Stand of the Tin Can Sailors, unfortunately my foggy memory some reason or other mistaken this with AAA.
The Germans did have different colored tracer rounds for its weapons; 7.9mm, 20mm even 37mm's, Its safe to say the Japanese might of used them as well although I have not seen any reference to Japanese "AAA" specifically using colored Dyes, rather it was simply the main batteries for adjusting their aim. If I remember correctly, it was because Radar was not on Japanese ships at the time, Dye aiming was just standard procedure even though the American's did have Radar, they still used Dye even during mid war.