jPaq Docs - Color()

Quick Stats

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

Summary

Creates mutable 24-bit color object.

Parameters

  1. [rValue] => Object
    Optional. This may either be a number or a string. If this is a string it must be a three or six digit hexadecimal code, or a CSS representation of a RGB parameters. If this is a string and the "gValue" or "bValue" parameters are set, this parameter will default to 0. If this is a number, it must be an integer representing how much red will be in the color. If this is a number, it must be greater than or equal to zero and less than or equal to 255. Otherwise, this value will default to 0.
  2. [gValue] => Number
    Optional. The amount of green that will compose the color. This value must be an integer greater than or equal to 0 and less than or equal to 255. If omitted, this value will be inferred from the "rValue". value.
  3. [bValue] => Number
    Optional. The amount of blue that will compose the color. This value must be an integer greater than or equal to 0 and less than or equal to 255. If omitted, this value will be inferred from "rValue".

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…