skip to main content
Gantt > Programmer's documentation > Developing with the JViews Charts SDK > Accessible charts > Use of colors in accessible applications
 
Use of colors in accessible applications
Five to ten percent of all people have a deficiency in color vision known as “color blindness”. Most people can see colors to some degree, but not all people see colors in the same way. For example, people with Protan vision have difficulty seeing red, people with Deutan vision have difficulty seeing green, and people with Tritan vision have difficulty seeing blue. Avoid using certain color combinations in critical applications, because not all people can distinguish them. For such color blind users, you must use what is known as ““color picking””, which is the deliberate avoidance of colors that color blind users are unable to distinguish. Specifically, when you use a set of colors in a diagram or chart, you should avoid using red and green in the same display for red-green-blind users, but you can use a range of colors from blue to yellow. The same applies to using blue and yellow in displays for blue-yellow-blind users.
In accessible applications, the information that is presented by using colors is also presented in other ways. The colors that are used therefore become redundant and are known as ““redundant colors””. For example, the data presented in a chart might be presented additionally as text in a table, often positioned below the chart. Different textures might be presented for filling the areas that belong to different data sets (for bar charts and area charts), different line styles for the different data sets (for polyline charts), and different marker shapes for the data points of different data sets (for polyline, bubble, and scatter plots). See Properties for Data Series and the IlvMarkerFactory class.
You can provide alternative color schemes for color blind users in several different ways.
For example, for charts that use cascading style sheets (CSS), you can use a combination of:
*A CSS file that specifies all properties other than colors.
*A CSS file that specifies colors.
You can select the CSS file that specifies colors from three variants:
*A variant for normal users.
*A variant for red-green blind users.
*A variant for blue-yellow blind users.
For charts that do not use CSS, you can specify the colors through the IlvChart.setDefaultColors and IlvChartRenderer.setStyles methods.
For Charts treemaps, you can use the IlvTreemapChartRenderer.setColorScheme method.
You can find a sample that illustrates the accessibility features of JViews Charts in <installdir>/jviews-chartsxx/samples/accessibility. .../ilog/views/chart/IlvChart.html#setDefaultColors(java.awt.Color[])

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.