The bands on the left sleeves of both enlisted and commissioned personnel match the division
colour to which he or she is assigned. This is also true of the commissioned officer’s shoulder strap and the shoulder tabs on the enlisted jumpsuits and the engineering protective suits.
The shirts with trapunto collars and cuffs worn by commissioned personnel also match his or her division
Cadet + Trainee sleeve and shoulder bands1) bear imposed slashes the colour of the divisions to which the enrolee will be assigned.
1) Only the sleeve bands had imposed slashes in the movies.
Fleet Academy instructors wear white with red slashes and a particular division stripe in the middle of the red slash.
We never saw any of those arm bands/shoulder straps in the movies but there were two admirals in the Federation Council scene in Star Trek IV: The Voyage Home with white arm bands/shoulder straps and red slashes. Therefore I assume that Mr. Fletcher's original system for academy instructors was changed.
Command officers who are attached to particular division, such as Commander McCoy, as head of his division on shipboard, may wear white slashes on his green sleeve band and shoulder strap or white sleeve band and strap with green slashes. The shirt colour in these cases is a matter of personal discretion.
Usually only commanding officers on ship board wear white shirts. Other officers in command of their divisions generally stick to shirts of their division colour and display white slashes on their sleeves & straps.
The shoulder strap closing the tunic of commissioned personnel terminates on the back of the right shoulder in a round silver colored electronic security clearance device which allows its wearer free access to locked and restricted areas for which he has been specifically authorized. Consequently not all these electronic decoding keys are the same shape.
2) Command officers don't have a white stripe but a tunic red one.