You can use mask and bit shifting to achieve this:
uint32_t newValue = oldValue;
newValue = newValue & 0xFF00FF00; // open new space to insert the bits
newValue = ((oldValue & 0xFF)<< 16) | newValue; // change BB
newValue = ((oldValue & 0x00FF0000) >> 16) | newValue; // Change RR