R2-D2 happened to be colored blue because that looked right in darkly lit scenes and in contrast to the white and metallics. Not because film makers said. "Hey let's make sure R2-D2 is male".
R2-KT on the other had "feminine programming" including pink accents. Out of universe the creation of R2-KT has a backstory that is heartwarming, tragic, and might help explain why the droid was envisioned the way it was.