Hello! I’ve made a RGB to colorblind RGB converter which can be helpful for you or for your game, this module brings support for many types of colorblindness that people in the real world have and have to deal with on a day to day basis and it’s not given much attention by developers but implementing support such as colorblind friendly color pallets or colorblind friendly user interfaces can make experience so much better for those who struggle with differentiating between two or more colors which can have very low contrast ratios which makes it hard to differentiate between other colors and some people can have troubles with colors such as red & green being used or mixed together as some might see more red than green or more green than red which can be frustrating for the person who’s colorblind, this does not mean that it’s just these two colors that could be causing problems it can range to many more, using two colors together is okay if one of them is not associated with CVD.
Please only use this appropriately, it’s recommended that you research on google on what colors you should look out for and not for the type of colorblindness.
Colorblindness types which are supported in this module
- Achromatopsia
- Achromatomaly
- Deuteranopia
- Deuteranomaly
- Protanopia
- Protanomaly
- Tritanopia
- Tritanomaly
Previous thread to where much was talked about this
Click here
RGB To Colorblind RGB Module
Click here
Game to see this in action
Click here
Usage and api documentation of module | Read before using
local ColorblindConverter = require(rgbToColorblindRgbModule) -- Make sure to define the module
local ColorblindRgbController = ColorblindConverter:colorblindType('Achromatopsia') -- Use the exact names provided in the supported list
local rgbValues = {255, 155, 0} -- The 'normal' rgb value we want converted to the colorblind rgb version
local ColorblindRgbHandler = ColorblindRgbController:convertRgb(unpack(rgbValues)) -- First argument is our variable 'rgbValues'
Now that’ all set up we can now use the method’s that are given to us from the module for ColorblindRgbHandler variable, it’s assigned to Achromatopsia in the code but you can always change that in the given list I’ve provided.
API for your Colorblind Rgb Handler
-
Property : Color3 - Color3 Instance
ColorblindRgbHandler.Color3 --> Color3.new(?, ?, ?)
-
Property : RGB - Table
ColorblindRgbHandler.RGB --> {R = ?, G = ?, B = ?}
-
Property : R - Number
ColorblindRgbHandler.R --> R value from RGB
-
Property : G - Number
ColorblindRgbHandler.G --> G value from RGB
-
Property : B - Number
ColorblindRgbHandler.B --> B value from RGB
HSV API
toHSV - Function - Has it’s own api
local hsvHandler = ColorblindRgbHandler:toHSV()
-
Property : Hue - Number
hsvHandler.Hue--> Hue value from RGB
-
Property : Saturation- Number
hsvHandler.Saturation--> Saturationvalue from RGB
-
Property : Value- Number
hsvHandler.Value--> HSV value from RGB
-
Property : HSV - Table
hsvHandler.HSV --> {Hue = ?, Saturation = ?, Value = ?}