Colorblindness simulation for Source engine mappers.
Created by Andrew Durdin, email@example.com.
.raw color tables for use with the
color_correction entity are
provided, that simulate the most common forms of colorblindness:
- Deuteranomaly/deuteranopia (red/green), which affects about 5% of men.
- Protanamoaly/protanopia (red/green), which affects about 2.5% of men.
- Tritanomaly/tritanopia (blue/yellow), which affects less than 1% of men and women.
Using these color tables allows you to test the readability of your maps for colorblind and partially colorblind people. A prefab and suggested keybinds are provided for easy use within a map.
The simulation is based on the method described in Digital Video Colourmaps for Checking the Legibility of Displays by Dichromats by Françoise Viénot, Hans Brettel, and John D. Mollon.
Included in this package is a Python script for converting between
color tables and
.tga image files.
Install the color tables:
tritanopia.rawinto the game directory, Steam Folder
\game short name`
Create the prefab:
- Select all entities.
- Choose Tools, Create Prefab.
colorblind_filtersfor the name.
autoexec.cfgfor the game in a text editor (Notepad will do). This file is located in Steam Folder
\game short name
\cfg\autoexec.cfg. Create the file if it doesn't exist.
Add the following lines. You can replace F7 with another key if you prefer.
alias "cycle_colorblind" "ent_fire relay_colorblind trigger" bind "F7" "cycle_colorblind"
Use the entity tool to insert the
colorblind_filtersentity in test builds of your map.
Load the map in the game, and press F7 to cycle between the different filters.
Using the Python script to convert other color tables
The Python script
colortable.py allows you to convert a color table to a
.tga image like this:
python colortable.py my-color-table.raw my-color-table.tga
Or to convert such a
.tga image back to a color table like this:
python colortable.py another-color-table.tga another-color-table.raw
You must have Python 2.6 or greater installed, and run these commands from the shell or terminal.
Copyright (C) 2011 by Andrew Durdin
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.