I'm sorry if this is off-topic here; please feel free to migrate it if it is.
Given the hex coordinates of a colour, and a type of colourblindness (e.g. protanopia), how do I calculate how that colour would appear to a person with that type of colourblindness? I've been throwing this at Google for a while now and it yields nothing no matter what search terms I use.