Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

trying to make a"color-blind mode" any ideas how?

Discussion in 'Editor & General Support' started by thesimi, Jul 27, 2011.

  1. thesimi

    thesimi

    Joined:
    Jun 16, 2009
    Posts:
    94
    the game I am working on is color based (you HAVE to be able to see the difference between colors to play it) and someone pointed out in the comments that it would be impossible for color blind people to play it.
    Does anyone know how to make a color blind mode? should I use different gray tones, use different shapes as texture or something I have thought of yet?
    thanks in advance:D
     
  2. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    I designed a board game with colour as an identifier. I found under yellowish light (which is fairly common in home lighting) that blues and greens can be difficult to tell apart. I set the graphics to greyscale in Photoshop as a test. I then tried again and again with differing shades until they could be distinguished.

    You could also use different textures to reinforce the differences. Tetris had to do this on the original Gameboy as there was no colour in the display.
     
  3. hypnoslave

    hypnoslave

    Joined:
    Sep 8, 2009
    Posts:
    436
    I have protanopia -- a red green color blindness. thanks for thinking of us gimps :')

    the only thing I can really say to help is to continually check your art using www.vischeck.com - click on vischeck on the right hand side and then "run images"

    I don't know how accurate that simulation is, but i'm sure it's probably pretty damn good because when I run an image in it I can't tell the difference between the origional and the one it creates. weather or not it's changing the image CORRECTLY, or in just a way I can't tell, is another question all together, but it's irrelevant as well.. if your art style is readible after being run through that filter, then you're golden.
     
    io-games likes this.
  4. burnumd

    burnumd

    Joined:
    May 27, 2008
    Posts:
    367
    This problem isn't strictly Unity related (or even strictly electronic game related). I'd suggest reading up on accessible gaming. See this blogpost on double coding. If you absolutely must use color (and you have Pro), this post-process effect from the Unity wiki will let you test what your game looks like to a color-blind person.
     
  5. zine92

    zine92

    Joined:
    Nov 13, 2010
    Posts:
    1,347
    Personally i think you can make something like in zuma. I played before and it have this colorblind mode where those commonly mistaken colors are changed to shades of grey so instead of the normal yellow, it becomes say dark grey.
     
  6. Cliff Owen

    Cliff Owen

    Joined:
    Sep 13, 2010
    Posts:
    3
    I recently had a similar comment from a customer, and so I devised a simple shader that lets me see what he sees. It basically combined Red/Green luminosity and sure enough, I cannot play my game now. Treat it all like a regular ImageEffect (so you need a render target texture and UnityPRO). I hope it helps.

    here's the shader

    Shader "Hidden/Red Green Color Blind" {
    Properties {
    _MainTex ("Base (RGB)", 2D) = "white" {}
    }

    SubShader {
    Pass {
    ZTest Always Cull Off ZWrite Off
    Fog { Mode off }

    CGPROGRAM
    #pragma vertex vert_img
    #pragma fragment frag
    #pragma fragmentoption ARB_precision_hint_fastest
    #include "UnityCG.cginc"

    uniform sampler2D _MainTex;

    fixed4 frag (v2f_img i) : COLOR
    {
    fixed4 original = tex2D(_MainTex, i.uv);

    fixed4 output = original;
    output.g = max( sqrt( ( original.r * original.r * 0.241 ) ), sqrt( original.g * original.g * 0.691 ) );
    output.r = output.g;

    return output;
    }
    ENDCG

    }
    }

    Fallback off

    }

    And here's the C# code to bind to your camera.


    using UnityEngine;

    [ExecuteInEditMode]
    [AddComponentMenu("Image Effects/Red-Green Color Blind")]
    public class RedGreenColorBlind : ImageEffectBase {

    // Called by camera to apply image effect
    void OnRenderImage (RenderTexture source, RenderTexture destination) {
    Graphics.Blit (source, destination, material);
    }
    }
     
  7. Thavron

    Thavron

    Joined:
    Aug 29, 2012
    Posts:
    364
  8. Drakhex666

    Drakhex666

    Joined:
    Sep 4, 2014
    Posts:
    2
    Is there a mobile version?
     
  9. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Why not just use unity's built in colour correction? This way you can have several schemes for colour blind people without any issues.
     
  10. correia55

    correia55

    Joined:
    Feb 22, 2014
    Posts:
    7
  11. Thavron

    Thavron

    Joined:
    Aug 29, 2012
    Posts:
    364
    I've created an asset called "xCBM: Color Blindness Master" coming soon to Unity Asset Store.
    It gives previews of different color blindness types so it is easy to identify what needs to be changed.
    More features are planned.
     
  12. Thavron

    Thavron

    Joined:
    Aug 29, 2012
    Posts:
    364
    "xCBM: Color Blindness Master" is now available at the Asset Store.
    Take a look.
     
  13. Omid7L

    Omid7L

    Joined:
    Jun 10, 2018
    Posts:
    14