From 9cfe49e4ae63cd80a23ae0f32ac15dcc859fb640 Mon Sep 17 00:00:00 2001 From: Joseph Wilson Date: Thu, 14 Dec 2023 01:20:48 +1300 Subject: [PATCH] Mention `color.map` module, give example (#2918) --- crates/typst/src/visualize/color.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/typst/src/visualize/color.rs b/crates/typst/src/visualize/color.rs index b327e92d6..fe66cc1a7 100644 --- a/crates/typst/src/visualize/color.rs +++ b/crates/typst/src/visualize/color.rs @@ -105,7 +105,12 @@ const ANGLE_EPSILON: f32 = 1e-5; /// /// # Predefined color maps /// Typst also includes a number of preset color maps that can be used for -/// gradients. Most of these color maps are chosen to be color blind friendly. +/// [gradients]($gradient.linear). These are simply arrays of colors defined in +/// the module `color.map`. +/// +/// ```example +/// #circle(fill: gradient.linear(..color.map.crest)) +/// ``` /// /// | Map | Details | /// |------------|:------------------------------------------------------------|