From a8bfec66e264d350d47c62c3990996be991f2b18 Mon Sep 17 00:00:00 2001 From: FerrinThreatt Date: Fri, 13 Jun 2025 11:11:22 -0400 Subject: [PATCH 01/10] added documentation to _getBrightness() and _getGreen() function --- src/color/p5.Color.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/color/p5.Color.js b/src/color/p5.Color.js index bddd312688..3e047b938f 100644 --- a/src/color/p5.Color.js +++ b/src/color/p5.Color.js @@ -546,6 +546,11 @@ class Color { } } + /** + * This function extracts the green value from a color object, returns green + * value in the range of 0 to 255 by default. When colorMode() is set to an + * RBG value, the green value within the givin range is returned + */ _getGreen(max=[0, 1]) { if(!Array.isArray(max)){ max = [0, max]; @@ -625,6 +630,13 @@ class Color { return map(to(this._color, 'hsl').coords[1], colorjsMax[0], colorjsMax[1], max[0], max[1]); } } + /** + * Brightness obtains the HSB brightness value from either a p5.Color object, + * an array of color components, or a CSS color string.Depending on value, + * when colorMode() is set a HSB value, this function will returns the + * brightness value in the range. By default, this function will return + * the HSB brightness within the range 0 - 100. + */ _getBrightness(max=[0, 100]) { if(!Array.isArray(max)){ From d3e898c88cf560192cfbb65f64d9263ea18185d3 Mon Sep 17 00:00:00 2001 From: FerrinThreatt <51208056+FerrinThreatt@users.noreply.github.com> Date: Tue, 17 Jun 2025 10:32:28 -0400 Subject: [PATCH 02/10] Update src/color/p5.Color.js Co-authored-by: Perminder Singh <127239756+perminder-17@users.noreply.github.com> --- src/color/p5.Color.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/color/p5.Color.js b/src/color/p5.Color.js index 3e047b938f..cd961f6ff2 100644 --- a/src/color/p5.Color.js +++ b/src/color/p5.Color.js @@ -549,7 +549,7 @@ class Color { /** * This function extracts the green value from a color object, returns green * value in the range of 0 to 255 by default. When colorMode() is set to an - * RBG value, the green value within the givin range is returned + * RBG value, the green value within the givin range is returned. */ _getGreen(max=[0, 1]) { if(!Array.isArray(max)){ From 8677f2b1d17661a6e67697e005973b400686047f Mon Sep 17 00:00:00 2001 From: FerrinThreatt <51208056+FerrinThreatt@users.noreply.github.com> Date: Tue, 17 Jun 2025 10:32:59 -0400 Subject: [PATCH 03/10] Update src/color/p5.Color.js Co-authored-by: Perminder Singh <127239756+perminder-17@users.noreply.github.com> --- src/color/p5.Color.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/color/p5.Color.js b/src/color/p5.Color.js index cd961f6ff2..92f59c7e27 100644 --- a/src/color/p5.Color.js +++ b/src/color/p5.Color.js @@ -548,7 +548,7 @@ class Color { /** * This function extracts the green value from a color object, returns green - * value in the range of 0 to 255 by default. When colorMode() is set to an + * value in the range of 0 to 255 by default. When `colorMode()` is set to an * RBG value, the green value within the givin range is returned. */ _getGreen(max=[0, 1]) { From 6af5d3ef0a6cffbf5e1338d3cd5b8746dbd6b8aa Mon Sep 17 00:00:00 2001 From: FerrinThreatt <51208056+FerrinThreatt@users.noreply.github.com> Date: Tue, 17 Jun 2025 10:33:10 -0400 Subject: [PATCH 04/10] Update src/color/p5.Color.js Co-authored-by: Perminder Singh <127239756+perminder-17@users.noreply.github.com> --- src/color/p5.Color.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/color/p5.Color.js b/src/color/p5.Color.js index 92f59c7e27..7c7c1e0bf8 100644 --- a/src/color/p5.Color.js +++ b/src/color/p5.Color.js @@ -632,7 +632,7 @@ class Color { } /** * Brightness obtains the HSB brightness value from either a p5.Color object, - * an array of color components, or a CSS color string.Depending on value, + * an array of color components, or a CSS color string. Depending on value, * when colorMode() is set a HSB value, this function will returns the * brightness value in the range. By default, this function will return * the HSB brightness within the range 0 - 100. From 71379c36727a49ed9074d7dc1973d6ae396eb8e6 Mon Sep 17 00:00:00 2001 From: FerrinThreatt <51208056+FerrinThreatt@users.noreply.github.com> Date: Tue, 17 Jun 2025 10:33:20 -0400 Subject: [PATCH 05/10] Update src/color/p5.Color.js Co-authored-by: Perminder Singh <127239756+perminder-17@users.noreply.github.com> --- src/color/p5.Color.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/color/p5.Color.js b/src/color/p5.Color.js index 7c7c1e0bf8..e0795219be 100644 --- a/src/color/p5.Color.js +++ b/src/color/p5.Color.js @@ -634,7 +634,7 @@ class Color { * Brightness obtains the HSB brightness value from either a p5.Color object, * an array of color components, or a CSS color string. Depending on value, * when colorMode() is set a HSB value, this function will returns the - * brightness value in the range. By default, this function will return + * brightness value within the current range. By default, this function will return * the HSB brightness within the range 0 - 100. */ From 00bbbd9ae03cbf2f97cf455412df9779c187335d Mon Sep 17 00:00:00 2001 From: FerrinThreatt <51208056+FerrinThreatt@users.noreply.github.com> Date: Tue, 17 Jun 2025 10:33:28 -0400 Subject: [PATCH 06/10] Update src/color/p5.Color.js Co-authored-by: Perminder Singh <127239756+perminder-17@users.noreply.github.com> --- src/color/p5.Color.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/color/p5.Color.js b/src/color/p5.Color.js index e0795219be..59ad25ad11 100644 --- a/src/color/p5.Color.js +++ b/src/color/p5.Color.js @@ -635,7 +635,7 @@ class Color { * an array of color components, or a CSS color string. Depending on value, * when colorMode() is set a HSB value, this function will returns the * brightness value within the current range. By default, this function will return - * the HSB brightness within the range 0 - 100. + * the HSB brightness within the range 0–100. */ _getBrightness(max=[0, 100]) { From 15999db2e7c808c14c1aaff706c3b39987f4d640 Mon Sep 17 00:00:00 2001 From: FerrinThreatt Date: Tue, 17 Jun 2025 10:35:40 -0400 Subject: [PATCH 07/10] typo updates to p5.Color.js --- src/color/p5.Color.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/color/p5.Color.js b/src/color/p5.Color.js index 59ad25ad11..7d0e5ffd96 100644 --- a/src/color/p5.Color.js +++ b/src/color/p5.Color.js @@ -548,8 +548,8 @@ class Color { /** * This function extracts the green value from a color object, returns green - * value in the range of 0 to 255 by default. When `colorMode()` is set to an - * RBG value, the green value within the givin range is returned. + * value in the range of 0 to 255 by default. When colorMode() is given to an + * RBG value, the green value within the givin range is returned */ _getGreen(max=[0, 1]) { if(!Array.isArray(max)){ @@ -632,10 +632,10 @@ class Color { } /** * Brightness obtains the HSB brightness value from either a p5.Color object, - * an array of color components, or a CSS color string. Depending on value, - * when colorMode() is set a HSB value, this function will returns the - * brightness value within the current range. By default, this function will return - * the HSB brightness within the range 0–100. + * an array of color components, or a CSS color string.Depending on value, + * when colorMode() is set a HSB value, this function will return the + * brightness value in the range. By default, this function will return + * the HSB brightness within the range 0 - 100. */ _getBrightness(max=[0, 100]) { From b606575da751b6c72777d2027ea158b72e65a732 Mon Sep 17 00:00:00 2001 From: FerrinThreatt Date: Tue, 17 Jun 2025 10:38:48 -0400 Subject: [PATCH 08/10] final typo updates to p5.Color.js --- src/color/p5.Color.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/color/p5.Color.js b/src/color/p5.Color.js index 7d0e5ffd96..d258bf10e2 100644 --- a/src/color/p5.Color.js +++ b/src/color/p5.Color.js @@ -547,8 +547,8 @@ class Color { } /** - * This function extracts the green value from a color object, returns green - * value in the range of 0 to 255 by default. When colorMode() is given to an + * This function extracts the green value from a color object and + * returns it in the range 0–255 by default. When colorMode() is given to an * RBG value, the green value within the givin range is returned */ _getGreen(max=[0, 1]) { @@ -633,7 +633,7 @@ class Color { /** * Brightness obtains the HSB brightness value from either a p5.Color object, * an array of color components, or a CSS color string.Depending on value, - * when colorMode() is set a HSB value, this function will return the + * wwhen `colorMode()` is set to HSB, this function will return the * brightness value in the range. By default, this function will return * the HSB brightness within the range 0 - 100. */ From c2056236264520b785dfb09f6d18d582b2dae2f5 Mon Sep 17 00:00:00 2001 From: Perminder Singh <127239756+perminder-17@users.noreply.github.com> Date: Wed, 18 Jun 2025 11:27:57 +0530 Subject: [PATCH 09/10] Update src/color/p5.Color.js --- src/color/p5.Color.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/color/p5.Color.js b/src/color/p5.Color.js index d258bf10e2..f0a426d7e2 100644 --- a/src/color/p5.Color.js +++ b/src/color/p5.Color.js @@ -633,7 +633,7 @@ class Color { /** * Brightness obtains the HSB brightness value from either a p5.Color object, * an array of color components, or a CSS color string.Depending on value, - * wwhen `colorMode()` is set to HSB, this function will return the + * when `colorMode()` is set to HSB, this function will return the * brightness value in the range. By default, this function will return * the HSB brightness within the range 0 - 100. */ From 655667dc096983c5ff35903d1a7a6f849abe97e5 Mon Sep 17 00:00:00 2001 From: Perminder Singh <127239756+perminder-17@users.noreply.github.com> Date: Wed, 18 Jun 2025 11:28:05 +0530 Subject: [PATCH 10/10] Update src/color/p5.Color.js --- src/color/p5.Color.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/color/p5.Color.js b/src/color/p5.Color.js index f0a426d7e2..b5a278f30b 100644 --- a/src/color/p5.Color.js +++ b/src/color/p5.Color.js @@ -548,7 +548,7 @@ class Color { /** * This function extracts the green value from a color object and - * returns it in the range 0–255 by default. When colorMode() is given to an + * returns it in the range 0–255 by default. When `colorMode()` is given to an * RBG value, the green value within the givin range is returned */ _getGreen(max=[0, 1]) {