US Navy Question

I just watched a show about US nuclear submarines on tv. I noticed that some of the petty officers’ chevrons were red and some were gold. What’s the difference?

E-1 through E-3 are color-coded by specialty.

Higher enlisted ratings are colored due to good service.