jPaq Docs - Color.prototype.getSafeColor()

Quick Stats

Target Platforms:  PC (JScript) and the web (JavaScript)
Download Count:  978

Summary

Produces a new color object representing black or white. If this color is closer to white, black will be returned. If this color is closer to black, white will be returned.

Returns

Color
Returns a new color object which represents black or white.

Related Examples

  1. Shading Colors
    Making colors darker and lighter across browsers isn't always easy, that is, unless you are using a JavaScript library like jPaq.  Below you…
  2. Foreground vs. Background
    I think one of the biggest complaints of users and web designers is the fact that many times people use background colors that are too…