Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Method of Computing Color Contrast Ratio of Text over Background Image or Gradient Background

IP.com Disclosure Number: IPCOM000241275D
Publication Date: 2015-Apr-13
Document File: 2 page(s) / 44K

Publishing Venue

The IP.com Prior Art Database

Abstract

Disclosed is an algorithm to systematically determine a color contrast ratio distribution of the foreground text over the background image or background gradient.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 51% of the total text.

Page 01 of 2

Method of Computing Color Contrast Ratio of Text over Background Image or Gradient Background

Color contrast compliance with the Web Content Accessibility Guidelines (WCAG) is established by the World Wide Web Consortium (W3C). Calculations to compute the color contrast ratio are based on formulas described by the W 3C, specifically Checkpoint 2.2: "Ensure that foreground and background color combinations provide sufficient contrast when viewed by someone having color deficits or when viewed on a black and white screen."*

However, these calculations work under the assumption that the foreground text color and background color are of uniform values . Currently, no method evaluates a normalized color contrast ratio or a normal distribution of color contrast ratio values over a non-uniform background image/gradient to indicate an acceptable range or threshold.

This disclosure outlines an algorithm to systematically determine such a color contrast ratio distribution of the foreground text over the background image or background gradient. The novel algorithm determines a range of color contrast values (i.e. the lowest computed and highest computed) throughout the space the foreground text occupies. The results are graphed as a normal distribution and presented to the user to indicate the range as well as the concentration /frequency of the occurrences.

The algorithm performs a pixel-to-pixel comparison of the foreground text color to that of the underlying text mask (i.e. shadow) of the background image directly beneath it.

Imagine the foreground text on a top layer sitting above the background image on a lower layer. If tracing the outline of the font into the background image, and then cutting it out, the result is a mask of the font in the background image. Now, instead of the uniform color of the foreground text, the product is the same cutout, but with the background image pixel colors.

For example: "TEXT" is the foreground text in blue. The background image is of a sunset. The goal is to have a cutout of the word "TEXT" filled with the sunset image. The process can compare that cutout pixel-by-pixel with the color blue of the foreground image. The result is a matrix of color contrast ratio values at every pixel location throughout the text.

To ensure that the color contrast ratio accounts for the direct pixels outlining the text (since the user sees the immed...