CodeSOD: A Splash of Color

This post was originally published on this site

The Daily WTF

YouTube, like any reasonable video service, offers closed captioning. They’ll even throw machine learning at the problem, and autogenerate captions, though that is usually only good for comedy, rather than actual accesibility.

Any closed captioning system will generally let you specify the colors of the captions as well as the actual text. YouTube is no exception to that. YouTube offers an online editor, but anyone serious about producing content is going to upload their own subtitle files, and up until recently, this could be done in an XML file which would allowed a lot of control over the styling of the captions.

But XML isn’t cool, so YouTube rolled out a new JSON format. Which broke everything. Specifically, instead of being able to set any hex triplet as your color, you could only set a relative handful, and any “invalid” triple would just turn to white.

For some reason, whatever

To read the full article click on the 'post' link at the top.