Sounds right.
To check do each shift operation independently and look at the result in your debugger/simulator or on paper.
My best explanation is that once a bit is shifted out of the word (24 bits) the bit is sent to the bit-bucket. When a bit is shifted in from the other end it is a zero shifted in. So breaking the operations down:
0xff0000 >> 16 = 0x0000ff
0x0000ff >> 3 = 0x00001f
0x00001f << 11 = 0x00f800
Whereas:
0xff0000 >> 8 = 0x00ff00
and:
0xff0000 >> 19 = 0x00001f
0x00001f << 11 = 0x00f800
Another way to get this result is:
(0xff0000 >>
& 0x00f800
if the 5 bits you need are not always ones