Documentation Index
Fetch the complete documentation index at: https://mintlify.com/peilingjiang/b5/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Color blocks in b5 are effect blocks - they affect subsequent drawing blocks through contextual relationships rather than wire connections. When selected, the grid highlights their effective range.Color Pickers
Color picker blocks provide a visual interface for selecting colors using hex values with alpha.fillPicker
Sets the fill color for shapes using a visual color picker.Hex color value with alpha channel (format: #RRGGBBaa)
strokePicker
Sets the stroke (outline) color for shapes using a visual color picker.Hex color value with alpha channel (format: #RRGGBBaa)
backgroundPicker
Sets the canvas background color using a visual color picker.Hex color value with alpha channel (format: #RRGGBBaa)
RGBA Color Blocks
RGBA blocks allow programmatic color control using separate red, green, blue, and alpha values.fillRGBA
Sets the fill color using RGBA values (0-255 for each channel).Red channel value (0-255)
Green channel value (0-255)
Blue channel value (0-255)
Alpha/opacity value (0-255, optional)
- Red increases as the circle moves right
- Green increases as the circle moves down
- Creates a gradient effect based on position
strokeRGBA
Sets the stroke color using RGBA values.Red channel value (0-255)
Green channel value (0-255)
Blue channel value (0-255)
Alpha/opacity value (0-255, optional)
randomRGB function:
randomRGB function generates random values between 170-220 for each channel when the mouse is pressed.
background
Sets the background color using RGBA values.Red channel value (0-255)
Green channel value (0-255)
Blue channel value (0-255)
Alpha/opacity value (0-255, optional)
blackBG function:
Color Effects and Scope
Color effect blocks affect all shapes drawn after them in the execution order:Common Color Patterns
Pattern 1: Static Colors
Pattern 2: Dynamic Colors
Pattern 3: Random Colors on Interaction
Pattern 4: Fade Effect Background
Color Value Ranges
RGB Values: All color channels (red, green, blue) accept values from 0-255
- 0 = minimum (no color)
- 255 = maximum (full color)
- Mix RGB values to create any color
Alpha Values: The alpha channel controls opacity
- 0 = fully transparent (invisible)
- 255 = fully opaque (solid)
- Values in between create transparency effects
Hex Colors: Format is #RRGGBBaa
- RR = red (00-ff)
- GG = green (00-ff)
- BB = blue (00-ff)
- aa = alpha (00-ff)
- Example: #ff0000ff is opaque red, #0000ff80 is half-transparent blue