@@ -31,11 +31,9 @@ import '../core/friendly_errors/fes_core';
3131 * let value = alpha(c); // Sets 'value' to 102
3232 * fill(value);
3333 * rect(50, 15, 35, 70);
34+ * describe('Left half of canvas light blue and right half light charcoal grey.');
3435 * </code>
3536 * </div>
36- *
37- * @alt
38- * Left half of canvas light blue and right half light charcoal grey.
3937 */
4038p5 . prototype . alpha = function ( c ) {
4139 p5 . _validateParameters ( 'alpha' , arguments ) ;
@@ -58,11 +56,10 @@ p5.prototype.alpha = function(c) {
5856 * let blueValue = blue(c);
5957 * fill(0, 0, blueValue);
6058 * rect(50, 20, 35, 60); // Draw right rectangle
59+ * describe('Left half of canvas light purple and right half a royal blue.');
6160 * </code>
6261 * </div>
6362 *
64- * @alt
65- * Left half of canvas light purple and right half a royal blue.
6663 */
6764p5 . prototype . blue = function ( c ) {
6865 p5 . _validateParameters ( 'blue' , arguments ) ;
@@ -88,6 +85,8 @@ p5.prototype.blue = function(c) {
8885 * let value = brightness(c); // Sets 'value' to 255
8986 * fill(value);
9087 * rect(50, 20, 35, 60);
88+ * describe(`Left half of canvas salmon pink and the right half with its
89+ * brightness colored white.`);
9190 * </code>
9291 * </div>
9392 *
@@ -101,12 +100,10 @@ p5.prototype.blue = function(c) {
101100 * let value = brightness(c); // A 'value' of 50% is 127.5
102101 * fill(value);
103102 * rect(50, 20, 35, 60);
103+ * describe(`Left half of canvas olive colored and the right half with its
104+ * brightness color gray.`);
104105 * </code>
105106 * </div>
106- *
107- * @alt
108- * Left half of canvas salmon pink and the right half with its brightness colored white.
109- * Left half of canvas olive colored and the right half with its brightness color gray.
110107 */
111108p5 . prototype . brightness = function ( c ) {
112109 p5 . _validateParameters ( 'brightness' , arguments ) ;
@@ -144,6 +141,8 @@ p5.prototype.brightness = function(c) {
144141 * fill(c);
145142 * noStroke();
146143 * rect(30, 20, 55, 55);
144+ * describe(`Yellow rect in middle right of canvas,
145+ * with 55 pixel width and height.`);
147146 * </code>
148147 * </div>
149148 *
@@ -157,6 +156,8 @@ p5.prototype.brightness = function(c) {
157156 * c = color(65);
158157 * fill(c);
159158 * ellipse(75, 75, 80, 80);
159+ * describe(`Yellow ellipse in top left of canvas, black ellipse in bottom
160+ * right, both 80×80.`);
160161 * </code>
161162 * </div>
162163 *
@@ -167,6 +168,7 @@ p5.prototype.brightness = function(c) {
167168 * fill(c);
168169 * noStroke();
169170 * rect(20, 20, 60, 60);
171+ * describe('Bright fuchsia rect in middle of canvas, 60 pixel width and height.');
170172 * </code>
171173 * </div>
172174 *
@@ -180,6 +182,7 @@ p5.prototype.brightness = function(c) {
180182 * c = color('#00ff00');
181183 * fill(c);
182184 * rect(55, 10, 45, 80);
185+ * describe('Two bright green rects on opposite sides of the canvas, both 45×80.');
183186 * </code>
184187 * </div>
185188 *
@@ -201,6 +204,7 @@ p5.prototype.brightness = function(c) {
201204 * c = color('rgba(0%, 0%, 100%, 1)');
202205 * fill(c);
203206 * rect(55, 55, 35, 35); // Draw rectangle
207+ * describe('Four blue rects in each corner of the canvas, each are 35×35.');
204208 * </code>
205209 * </div>
206210 *
@@ -214,6 +218,8 @@ p5.prototype.brightness = function(c) {
214218 * c = color('hsla(160, 100%, 50%, 0.5)');
215219 * fill(c);
216220 * rect(55, 10, 45, 80); // Draw rectangle
221+ * describe(`Bright sea green rect on left and darker rect on right of canvas,
222+ * both 45×80.`);
217223 * </code>
218224 * </div>
219225 *
@@ -227,6 +233,8 @@ p5.prototype.brightness = function(c) {
227233 * c = color('hsba(160, 100%, 50%, 0.5)');
228234 * fill(c);
229235 * rect(55, 10, 45, 80); // Draw rectangle
236+ * describe(`Dark green rect on left and lighter green rect on right of canvas,
237+ * both 45×80.`);
230238 * </code>
231239 * </div>
232240 *
@@ -240,18 +248,10 @@ p5.prototype.brightness = function(c) {
240248 * c = color(50, 55, 100);
241249 * fill(c);
242250 * rect(55, 10, 45, 80);
251+ * describe(`Dark blue rect on left and light teal rect on right of canvas,
252+ * both 45×80.`);
243253 * </code>
244254 * </div>
245- *
246- * @alt
247- * Yellow rect in middle right of canvas, with 55 pixel width and height.
248- * Yellow ellipse in top left of canvas, black ellipse in bottom right,both 80×80.
249- * Bright fuchsia rect in middle of canvas, 60 pixel width and height.
250- * Two bright green rects on opposite sides of the canvas, both 45×80.
251- * Four blue rects in each corner of the canvas, each are 35×35.
252- * Bright sea green rect on left and darker rect on right of canvas, both 45×80.
253- * Dark green rect on left and lighter green rect on right of canvas, both 45×80.
254- * Dark blue rect on left and light teal rect on right of canvas, both 45×80.
255255 */
256256
257257/**
@@ -312,11 +312,10 @@ p5.prototype.color = function() {
312312 * print(greenValue); // Print "75.0"
313313 * fill(0, greenValue, 0); // Use 'greenValue' in new fill
314314 * rect(50, 20, 35, 60); // Draw right rectangle
315+ * describe(`blue rect on left and green on right, both with black outlines
316+ * & 35×60.`);
315317 * </code>
316318 * </div>
317- *
318- * @alt
319- * blue rect on left and green on right, both with black outlines & 35×60.
320319 */
321320p5 . prototype . green = function ( c ) {
322321 p5 . _validateParameters ( 'green' , arguments ) ;
@@ -347,11 +346,10 @@ p5.prototype.green = function(c) {
347346 * let value = hue(c); // Sets 'value' to "0"
348347 * fill(value);
349348 * rect(50, 20, 35, 60);
349+ * describe('salmon pink rect on left and black on right, both 35×60.');
350350 * </code>
351351 * </div>
352352 *
353- * @alt
354- * salmon pink rect on left and black on right, both 35×60.
355353 */
356354p5 . prototype . hue = function ( c ) {
357355 p5 . _validateParameters ( 'hue' , arguments ) ;
@@ -394,11 +392,10 @@ p5.prototype.hue = function(c) {
394392 * rect(50, 20, 20, 60);
395393 * fill(to);
396394 * rect(70, 20, 20, 60);
395+ * describe(`4 rects one tan, brown, brownish purple, purple, with white
396+ * outlines & 20×60`);
397397 * </code>
398398 * </div>
399- *
400- * @alt
401- * 4 rects one tan, brown, brownish purple, purple, with white outlines & 20×60
402399 */
403400
404401p5 . prototype . lerpColor = function ( c1 , c2 , amt ) {
@@ -468,11 +465,10 @@ p5.prototype.lerpColor = function(c1, c2, amt) {
468465 * let value = lightness(c); // Sets 'value' to 50
469466 * fill(value);
470467 * rect(50, 20, 35, 60);
468+ * describe(`light pastel green rect on left and dark grey rect on right,
469+ * both 35×60.`);
471470 * </code>
472471 * </div>
473- *
474- * @alt
475- * light pastel green rect on left and dark grey rect on right, both 35×60.
476472 */
477473p5 . prototype . lightness = function ( c ) {
478474 p5 . _validateParameters ( 'lightness' , arguments ) ;
@@ -497,6 +493,8 @@ p5.prototype.lightness = function(c) {
497493 * print(redValue); // Print "255.0"
498494 * fill(redValue, 0, 0); // Use 'redValue' in new fill
499495 * rect(50, 20, 35, 60); // Draw right rectangle
496+ * describe(`yellow rect on left and red rect on right, both with black
497+ * outlines and 35×60.`);
500498 * </code>
501499 * </div>
502500 *
@@ -507,12 +505,9 @@ p5.prototype.lightness = function(c) {
507505 * colorMode(RGB, 1); // Sets the range for red, green, and blue to 1
508506 * let myColor = red(c);
509507 * print(myColor); // 0.4980392156862745
508+ * describe('grey canvas');
510509 * </code>
511510 * </div>
512- *
513- * @alt
514- * yellow rect on left and red rect on right, both with black outlines and 35×60.
515- * grey canvas
516511 */
517512p5 . prototype . red = function ( c ) {
518513 p5 . _validateParameters ( 'red' , arguments ) ;
@@ -542,11 +537,9 @@ p5.prototype.red = function(c) {
542537 * let value = saturation(c); // Sets 'value' to 126
543538 * fill(value);
544539 * rect(50, 20, 35, 60);
540+ * describe('deep pink rect on left and grey rect on right, both 35×60.');
545541 * </code>
546542 * </div>
547- *
548- * @alt
549- *deep pink rect on left and grey rect on right, both 35×60.
550543 */
551544p5 . prototype . saturation = function ( c ) {
552545 p5 . _validateParameters ( 'saturation' , arguments ) ;
0 commit comments