Git Product home page Git Product logo

asecvdsim's Introduction

Aseprite CVD Simulation

With libDaltonLens

This repository is an adaptation of libDaltonLens by Nicolas Burrus to Lua. The code simulates how individuals with color vision deficiency (CVD), also known as color blindness, view an image. As with the original repository, this code uses the Unlicense, and is released to the public domain.

The code has been modified for use with the Aseprite scripting API.

To get this script, click on the green Code button above, then select Download Zip. You can also click on the aseDaltonLens.lua file. Beware that some browsers will append a .txt file format to script files on download; Aseprite will not recognize the script until this is removed and the original .lua format is used. There can also be issues with copying and pasting. Be sure to click on the Raw file button; do not copy the formatted code.

To use this script, open Aseprite. In the menu bar, go to File > Scripts > Open Scripts Folder. Copy and paste the Lua script from this repository into that folder. Return to Aseprite; go to File > Scripts > Rescan Scripts Folder (the default hotkey is F5). The script should now be listed under File > Scripts. Select aseDaltonLens.lua to launch the dialog.

To assign a hotkey to the dialog script go to Edit > Keyboard Shortcuts. Once the dialog is open, Alt+O is the keyboard shortcut for the OK button. Alt+C is the shortcut for the CANCEL button.

Screen Cap

Upon activation, the script will duplicate the active sprite, convert it to RGB color mode, flatten its layers and then create a new layer with the CVD simulation of the source images.

This is an animated plot for the three types of CVD, protanopia, deuteranopia and tritanopia:

Animated

The plot was made with SRLAB2, a variant of CIE LAB. The plotted points are the sRGB primary and secondary colors: red (R), yellow (Y), green (G), cyan (C), blue (B) and magenta (M). Note that these 6 colors are not located at the same angle -- nor are they the same angular distance from one another -- as they would be if they were plotted on an HSV/HSL color wheel.

Common-place labels for the three types of CVD, such as "Red-Green" or "Blue-Yellow" weakness, have been avoided because they contribute to the misunderstanding of CVD.

For more information, Burrus's articles are recommended:

asecvdsim's People

Contributors

behreajj avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.