RGB filters for different forms of color blindness

后端 未结 8 2158
渐次进展
渐次进展 2021-01-31 11:19

My father is color blind and given that I work in games where the visuals are important, I\'ve always wanted to write a filter for screen shots (or even some type of shader) tha

相关标签:
8条回答
  • 2021-01-31 12:03

    I have these transformations and code explained in detail on my color blindness page. Essentially, for each type of color blindness you first linearize the RGB values then apply a transformation matrix (this is a product of 5 matrices that I list individually) and then clip to [0,1] and de-linearize back to sRGB.

    For example, for deuteranopia, the matrix product is

     0.33066007 0.66933993 0
     0.33066007 0.66933993 0
    -0.02785538 0.02785538 1   
    

    This is a combination of: rgb -> XYZ -> LMS -> deuteranopia correction -> XYZ -> rgb.

    You can download my R code that illustrates these calculations.

    0 讨论(0)
  • 2021-01-31 12:04

    Can't help you on algorithms, but the following article was quite an eye-opener (excuse the pun): http://critiquewall.com/2007/12/10/blindness.

    Ah, actually, http://www.vischeck.com/ is useful.

    0 讨论(0)
提交回复
热议问题