In-application adjacent color contrast detection
AssigneeOpenGov, Inc.
InventorsMichael Bonfiglio, Andrew Reder, Seth McLeod
Life of this patent
Estimating the term…
Abstract
Methods and systems disclosed relate to color controls for visual accessibility within applications. Within a content editor of an application, a user may choose one or more colors for a content element. Upon choosing the color for the content element, a color control generates a contrast ratio between the chosen color of the content element and a background color upon which the content element may be seen. If a contrast ratio is not met or exceeded, an indicator is provided to a user. In some embodiments, the color control may further recommend an accessible color to the user in place of the chosen color, such that the contrast ratio between the accessible color and the background color meets or exceeds the threshold.
Claims20
A method for controlling color in an application, comprising:
- receiving at an application comprising a background color, a command to open a content editing tool of the application in a context of a graphical element of the application;
- receiving at the content editing tool, a color selection for the graphical element comprising a foreground color;
- calculating a first contrast ratio between the background color and the foreground color;
- comparing the first contrast ratio to a contrast ratio threshold;
- displaying, in the content editing tool, an indication that the first contrast ratio is greater than or less than the contrast ratio threshold;
- and
- displaying a recommended color for the graphical element, further comprising:
- determining a luminance of a plurality of colors relative to the luminance of the background color;
- and
- setting the recommended color as one or more of the plurality of colors having a contrast ratio relative to the background color above the contrast ratio threshold.
A system comprising:
- a memory comprising executable instructions for controlling color in an application;
- and
- a processor configured to execute the executable instructions and cause the system to:
- receive at an application comprising a background color, a command to open a content editing tool of the application in a context of a graphical element of the application;
- receive at the content editing tool, a color selection for the graphical element comprising a foreground color;
- calculate a first contrast ratio between the background color and the foreground color;
- compare the first contrast ratio to a contrast ratio threshold;
- display, in the content editing tool, an indication that the first contrast ratio is one of greater than or less than the contrast ratio threshold;
- and
- display a recommended color for the graphical element, wherein in order to display the recommended color for the graphical element, the processor is configured to cause the system to further:
- determine a luminance of a plurality of colors relative to the luminance of the background color;
- and
- set the recommended color as one or more of the plurality of colors having a contrast ratio relative to the background color above the contrast ratio threshold.
A method for controlling color in an application, comprising:
- receiving at an application comprising a background color, a command to open a content editing tool of the application in a context of a graphical element of the application;
- receiving at the content editing tool, a color selection for the graphical element comprising a foreground color;
- calculating a first contrast ratio between the background color and the foreground color, further comprising measuring a relative luminance of the color selection and a relative luminance of the background color;
- comparing the first contrast ratio to a contrast ratio threshold;
- and
- displaying, in the content editing tool, an indication that the first contrast ratio is greater than or less than the contrast ratio threshold.
Dependencies are inferred from the claim text.