Skip to content

Commit 230aeec

Browse files
authored
updating RGB max values and HSB, HSL
1 parent 3be913a commit 230aeec

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/color/setting.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -782,8 +782,10 @@ function setting(p5, fn){
782782
* as a grayscale color. However, how that single parameter translates into a grayscale value
783783
* depends on the color mode:
784784
*
785-
* - `RGB, HSB, and HSL`: The single value will be used consistently for the gray equivalent
786-
* in each of these modes (for example, mapping to red/green/blue channels equally in RGB).
785+
* - `RGB, HSB, and HSL`: In RGB, the single value is interpreted using the “blue” maximum
786+
* (i.e., the single parameter is mapped to the blue channel's max).
787+
* In HSB and HSL, the single value is mapped to Brightness and Lightness max respectively with hue=0 .
788+
* and saturation=0.
787789
*
788790
* - `LAB, LCH, OKLAB, and OKLCH`: The single value is taken to be the `lightness (L)` component,
789791
* with the specified max range for that channel.

0 commit comments

Comments
 (0)