Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

AccessibleColors

Guides

  • AccessibleColors

Tech Notes

  • Designing Accessible Color Schemes

Symbols

  • AccessibleTextColor
  • AdjustForContrast
  • WCAGContrastRatio
  • WCAGLevel

Overviews

  • AccessibleColors
Wolfram`AccessibleColors`
AdjustForContrast
​
AdjustForContrast
[fg,bg]
darkens or lightens the foreground color
fg
until it reaches the target WCAG contrast ratio against the background
bg
, returning the adjusted color.
​
Details and Options
Examples  
(6)
Scope  
(1)
The resulting pair meets the requested ratio:
In[1]:=
WCAGContrastRatio

AdjustForContrast
[Gray,White],White
Out[1]=
4.5
Options  
(1)

Applications  
(1)

Properties & Relations  
(1)

Possible Issues  
(1)

Neat Examples  
(1)

SeeAlso
WCAGContrastRatio
 
▪
WCAGLevel
 
▪
AccessibleTextColor
RelatedGuides
▪
AccessibleColors
Mid gray on white does not pass AA, so it is darkened until it does:
In[1]:=
AdjustForContrast
[Gray,White]
Out[1]=
""

© 2026 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com