All Projects → Nowosad → colorblindcheck

Nowosad / colorblindcheck

Licence: Unknown, MIT licenses found Licenses found Unknown LICENSE MIT LICENSE.md
Tools helping to decide if a color palette is colorblind friendly

Programming Languages

HTML
75241 projects
r
7636 projects

Projects that are alternatives of or similar to colorblindcheck

Color Thief Java
Grabs the dominant color or a representative color palette from an image. A very fast Java port of Lokesh Dhakar's JavaScript version.
Stars: ✭ 178 (+747.62%)
Mutual labels:  colors
Ac Colors
ac-colors is a reactive JavaScript color library that can freely convert between RGB, HSL, HEX, XYZ, LAB, LCHab, LUV, and LCHuv, as well as handle random color generation and contrast ratio calculation.
Stars: ✭ 243 (+1057.14%)
Mutual labels:  colors
hackerinnen
hackerinnen.space is a project to provide encouragement and enhance visibility in different places
Stars: ✭ 22 (+4.76%)
Mutual labels:  colors
Capable
Keep track of accessibility settings, leverage high contrast colors, and use scalable fonts to enable users with disabilities to use your app.
Stars: ✭ 189 (+800%)
Mutual labels:  colors
Androidphotoshopcolorpicker
A fully featured Color picker Library for Android
Stars: ✭ 220 (+947.62%)
Mutual labels:  colors
slick
Vim/Neovim Colortheme–Truecolor, Stunning, Complete
Stars: ✭ 15 (-28.57%)
Mutual labels:  colors
Vim Janah
Vim colorscheme.
Stars: ✭ 172 (+719.05%)
Mutual labels:  colors
UIImageColorRatio
A tool to calculate the color ratio of UIImage in iOS.
Stars: ✭ 34 (+61.9%)
Mutual labels:  colors
Tints And Shades
🌈 Display tints and shades of a given hex color in 10% increments.
Stars: ✭ 228 (+985.71%)
Mutual labels:  colors
tailwind-css-palette-generator
10-color Palette Generator and API for Tailwind CSS
Stars: ✭ 206 (+880.95%)
Mutual labels:  colors
Colors.lol
🎨 Overly descriptive color palettes
Stars: ✭ 207 (+885.71%)
Mutual labels:  colors
Nova Colors
Single source of truth to consume Nova color values
Stars: ✭ 217 (+933.33%)
Mutual labels:  colors
charmed-dark-xcode-theme
A charming and colorful dark theme for Xcode 🌈.
Stars: ✭ 172 (+719.05%)
Mutual labels:  colors
Webgradients
A curated collection of splendid gradients made in CSS3, .sketch and .PSD formats.
Stars: ✭ 2,197 (+10361.9%)
Mutual labels:  colors
Colora
Color converter, screen color picker and color palettes for Windows
Stars: ✭ 32 (+52.38%)
Mutual labels:  colors
Jsome
✨ Make your JSON look AWESOME
Stars: ✭ 179 (+752.38%)
Mutual labels:  colors
Huge Collection Of Cheatsheet
Share of my Huge Collection of Cheatsheet (Coding, Cheat, Pinouts, Command Lists, Etc.)
Stars: ✭ 250 (+1090.48%)
Mutual labels:  colors
colors
A gorgeous, accessible color system.
Stars: ✭ 748 (+3461.9%)
Mutual labels:  colors
conic.css
nice'n simple conic gradients 🎨
Stars: ✭ 195 (+828.57%)
Mutual labels:  colors
HexTags
Customize tags & chat colors!
Stars: ✭ 53 (+152.38%)
Mutual labels:  colors

colorblindcheck

CRAN status Travis build status Codecov test coverage CRAN RStudio mirror downloads

Deciding if a color palette is a colorblind friendly is a hard task. This cannot be done in an entirely automatic fashion, as the decision needs to be confirmed by visual judgments. The goal of colorblindcheck is to provide tools to decide if the selected color palette is colorblind friendly, including:

  • palette_dist() - Calculation of the distances between the colors in the input palette and between the colors in simulations of the color vision deficiencies: deuteranopia, protanopia, and tritanopia.
  • palette_plot() - Plotting of the original input palette and simulations of color vision deficiencies: deuteranopia, protanopia, and tritanopia.
  • palette_check() - Creating summary statistics comparing the original input palette and simulations of color vision deficiencies: deuteranopia, protanopia, and tritanopia.

The work in this package was inspired by a blog post I wrote some code that automatically checks visualizations for non-colorblind safe colors. Here’s how it works by Gregor Aisch.

Installation

You can install the released version of colorblindcheck from CRAN with:

install.packages("colorblindcheck")

You can install the development version of colorblindcheck from GitHub with:

remotes::install_github("nowosad/colorblindcheck")

Example

The colorblindcheck accepts a vector of hexadecimal color descriptions as the input. It can be created using different existing R functions (e.g. rainbow()) or packages (e.g. colorspace, RColorBrewer, rcartocolor, etc.).

library(colorblindcheck)
rainbow_pal = rainbow(n = 7)
rainbow_pal
#> [1] "#FF0000" "#FFDB00" "#49FF00" "#00FF92" "#0092FF" "#4900FF" "#FF00DB"

The primary function in this package is palette_check(), which creates a summary comparison between the original input palette and simulations of color vision deficiencies - deuteranopia, protanopia, and tritanopia.

palette_check(rainbow_pal, plot = TRUE)

#>           name n tolerance ncp ndcp  min_dist mean_dist  max_dist
#> 1       normal 7  12.13226  21   21 12.132257  61.06471 107.63470
#> 2 deuteranopia 7  12.13226  21   18  7.725825  50.11732  91.56339
#> 3   protanopia 7  12.13226  21   19  2.355309  55.41310  88.34820
#> 4   tritanopia 7  12.13226  21   19  8.216194  51.53678  83.10000

The palette_check() function returns a data.frame with 4 observations and 8 variables:

  • name: original input color palette (normal), deuteranopia, protanopia, and tritanopia
  • n: number of colors
  • tolerance: minimal value of the acceptable difference between the colors to distinguish between them
  • ncp: number of color pairs
  • ndcp: number of differentiable color pairs (color pairs with distances above the tolerance value)
  • min_dist: minimal distance between colors
  • mean_dist: average distance between colors
  • max_dist: maximal distance between colors

Additionally, a plot comparing the original input palette and simulations of color vision deficiencies - deuteranopia, protanopia, and tritanopia can be shown. This help to decide if the selected color palette is colorblind friendly.

For example, the above output shows that the minimal distance between colors in the input palette is about 12; however, the minimum distance between colors simulation of protanopia is only about 2. It can suggest that some colors in this palette would not be distinguishable by people with protanopia.

The palette_dist() function calculates distances between the colors in the input palette, as well as in a simulation of the selected color vision deficiency - deuteranopia, protanopia, and tritanopia. It allows finding which colors are the most or the least similar and to compare the behavior of color palettes for different color vision deficiencies. In the original rainbow_pal object, the closest colors were the third and the fourth one (a distance of about 12); however, the protanopia version has a minimal distance of 2 between the second and third color.

# normal
palette_dist(rainbow_pal)
#>      [,1]     [,2]     [,3]     [,4]     [,5]     [,6]      [,7]
#> [1,]   NA 52.96503 85.06611 84.19100 52.61836 51.46782  39.46279
#> [2,]   NA       NA 29.34232 34.74051 65.68745 92.04784  80.83188
#> [3,]   NA       NA       NA 12.13226 69.12782 81.23889 107.63470
#> [4,]   NA       NA       NA       NA 56.87222 74.19228 103.11485
#> [5,]   NA       NA       NA       NA       NA 35.47760  44.20031
#> [6,]   NA       NA       NA       NA       NA       NA  29.94683
#> [7,]   NA       NA       NA       NA       NA       NA        NA
# protanopia
palette_dist(rainbow_pal, cvd = "pro")
#>      [,1]     [,2]      [,3]     [,4]     [,5]     [,6]      [,7]
#> [1,]   NA 73.78789 76.166629 75.13412 58.36222 52.03797 50.317457
#> [2,]   NA       NA  2.355309 12.76751 64.91260 86.33061 84.667281
#> [3,]   NA       NA        NA 12.48830 66.28036 88.34820 86.569277
#> [4,]   NA       NA        NA       NA 56.80334 77.98335 76.869176
#> [5,]   NA       NA        NA       NA       NA 29.43598 28.504135
#> [6,]   NA       NA        NA       NA       NA       NA  3.553296
#> [7,]   NA       NA        NA       NA       NA       NA        NA

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].