rgb
Create an RGB(A) color.
The color is specified in the sRGB color space.
Note: While you can specify transparent colors and Typst's preview will render them correctly, the PDF export does not handle them properly at the moment. This will be fixed in the future.
Example
#square(fill: rgb("#b1f2eb"))
#square(fill: rgb(87, 127, 230))
#square(fill: rgb(25%, 13%, 65%))

ParametersParameters are the inputs to a function. They are specified in parentheses after the function name.
Parameters are the inputs to a function. They are specified in parentheses after the function name.
hex
The color in hexadecimal notation.
Accepts three, four, six or eight hexadecimal digits and optionally a leading hashtag.
If this string is given, the individual components should not be given.
#text(16pt, rgb("#239dad"))[
*Typst*
]

red
The red component.
green
The green component.
blue
The blue component.
alpha
The alpha component.