Patterns can help distinguish differences, in addition to color. Simple patterns can be implemented using SVG or CSS, without requiring additional images to be created/downloaded.
Trello has a "color-blind mode" which adds patterns to the tags :
Add :hover effects
If the user hovers their mouse over the chart legend, it should highlight the parts of the chart that it refers to. This isn't a perfect solution because it doesn't help users until they reach for their mouse, but it would certainly help.
Choose a color palette with dataviz in mind
13 is a lot of colors, so you might have difficulty doing this any way. Read through this, and check out the comment section.
Break your chart up into smaller charts to reduce the number of required colors
Again, you might not be able to do this, but displaying 13 bars on a bar chart (or whatever chart you are using) is a lot to look at. Even with 13 different colors/patterns, you might want to consider a different visualization.