Browse Prior Art Database

Use of Brightness Property for Determining Maximum Contrast

IP.com Disclosure Number: IPCOM000117953D
Original Publication Date: 1996-Jul-01
Included in the Prior Art Database: 2005-Mar-31
Document File: 2 page(s) / 68K

Publishing Venue

IBM

Related People

Pacholski, P: AUTHOR

Abstract

This invention offers a method for helping a programmer select a foreground color that provides a maximum contrast against a given background color.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Use of Brightness Property for Determining Maximum Contrast

      This invention offers a method for helping a programmer select
a foreground color that provides a maximum contrast against a given
background color.

      In Graphical User Interface (GUI) systems, it is often
necessary to draw graphic objects (i.e., line, square, etc.) on an
existing window whose background color is already defined.  An
example would be a grid object drawn on a window of a GUI editor
(OS/2* 2.1 Toolkit Dialog Editor is an example of a GUI editor).  One
difficulty that must be overcome when drawing one graphic object on
top of another  lies in choosing the color of the foreground object
so that it provides  maximum contrast against the color of the
background object.

      The solution to this problem exploits the brightness property
of a given color; if one knows the brightness of a background color,
one can choose a foreground color whose brightness is the opposite of
the given background color.  The brightness in this invention is
defined as the Y value in the XYZ color space.  While in the RGB
color space, a color is defined in terms of chromaticity values (X
and Z) and luminance value (Y) which is related to the perception of
brightness.  The following is a general description of how this
invention was implemented.

      If a color of the background window is used and defined as
a 1 x 3 RGB vector: (Red,Green,Blue), where Red, Green an Blue are
intensities of the three primaries in the range of 0 to 255, we
compute, a gray level value in the range 0 to 255 that corresponds to
the brightness level of the input RGB vector.  The programmer can now
use this information to determine what gray level value gives maximum
contrast against the original RGB ve...