Skip to content

Commit d8d6f4f

Browse files
authored
Merge pull request #6047 from sawaisinghh/sawaisinghh-document-parameteres
#6006 issue: Update p5.Color.js
2 parents fc8aff9 + e270919 commit d8d6f4f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/color/p5.Color.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,17 @@ import color_conversion from './color_conversion';
2525
* representations as they are calculated. This is done to prevent repeating a
2626
* conversion that has already been performed.
2727
*
28+
* <a href="#/p5/color">color()</a> is the recommended way to create an instance
29+
* of this class. However, one can also create a color instace from the constructor
30+
* using the parameters below.
31+
*
2832
* @class p5.Color
2933
* @constructor
34+
* @param {p5} [pInst] pointer to p5 instance.
35+
*
36+
* @param {Number[]|String} vals an array containing the color values
37+
* for red, green, blue and alpha channel
38+
* or CSS color.
3039
*/
3140
p5.Color = function(pInst, vals) {
3241
// Record color mode and maxes at time of construction.

0 commit comments

Comments
 (0)