Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/color/p5.Color.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,18 @@ import color_conversion from './color_conversion';
* We also cache normalized, floating-point components of the color in various
* representations as they are calculated. This is done to prevent repeating a
* conversion that has already been performed.
*
* <a href="#/p5/color">color()</a> is the recommended way to create an instance
* of this class. However, one can also create a color instace from the constructor
* using the parameters below.
*
* @class p5.Color
* @constructor
* @param {p5} [pInst] pointer to p5 instance.
*
* @param {Number[]|String} vals an array containing the color values
* for red, green, blue and alpha channel
* or CSS color.
*/
p5.Color = function(pInst, vals) {
// Record color mode and maxes at time of construction.
Expand Down