p5.js · 3 / 6

Dashboard
Creative coding · p5.js

RGB vs HSB

Default fills use RGB. Calling colorMode(HSB, …) makes hue a wheel — great for gradients that shift without muddy greys. Remember to reset modes when mixing snippets so older sketches keep predictable colors.