summaryrefslogtreecommitdiff
path: root/library/src/compute/create.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-12-19 01:16:35 +0100
committerLaurenz <laurmaedje@gmail.com>2022-12-19 01:16:35 +0100
commitb4b022940b908d8fe490b9f4f68bc60dcfb76cd2 (patch)
treebc93a2f51295f97f971466ab87bdd763c0ed6002 /library/src/compute/create.rs
parentba384e5bb6c2455eb431f6e1fcc8b98aca1e9879 (diff)
Syntax and example sections
Diffstat (limited to 'library/src/compute/create.rs')
-rw-r--r--library/src/compute/create.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/library/src/compute/create.rs b/library/src/compute/create.rs
index e3733d60..cb693a1c 100644
--- a/library/src/compute/create.rs
+++ b/library/src/compute/create.rs
@@ -77,12 +77,21 @@ pub fn luma(args: &mut Args) -> SourceResult<Value> {
///
/// If this string is given, the individual components should not be given.
///
+/// # Example
+/// ```
+/// #let color = rgb("#239dad")
+/// #text(16pt, color)[*Typst*]
+/// ```
+///
/// - red: Component (positional)
/// The red component.
+///
/// - green: Component (positional)
/// The green component.
+///
/// - blue: Component (positional)
/// The blue component.
+///
/// - alpha: Component (positional)
/// The alpha component.
///
@@ -125,10 +134,13 @@ castable! {
/// # Parameters
/// - cyan: RatioComponent (positional, required)
/// The cyan component.
+///
/// - magenta: RatioComponent (positional, required)
/// The magenta component.
+///
/// - yellow: RatioComponent (positional, required)
/// The yellow component.
+///
/// - key: RatioComponent (positional, required)
/// The key component.
///