You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/manual.typ
+15-13Lines changed: 15 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
#import"@preview/css-colors:0.1.0": *
1
+
#import"@preview/niram-css:0.1.0": *
2
2
// Global Styles
3
3
#setpage(margin: 25mm)
4
4
#settext(size: 11pt, font: "Noto Serif")
@@ -36,7 +36,7 @@
36
36
37
37
// End of setup
38
38
39
-
= The `css-colors` Package
39
+
= The `niram-css` Package
40
40
41
41
== History
42
42
@@ -94,21 +94,23 @@ Typst ships with #link("https://typst.app/docs/reference/visualize/color/#predef
94
94
The remaining seventeen colors have identical names, but---with the exception of `white` and `black`---they
95
95
have different RGB/Hex values, as shown in @comparison-typst-css-colors.
96
96
97
-
== Purpose of Package
97
+
== Purpose of the `niram-css`Package
98
98
99
-
The `css-colors` package is a robust convenience which allows #link("https://www.w3.org/TR/css-color-3/#svg-color")[CSS/SVG colors] to be used by their names within a Typst file, rather than by their RGB/Hex codes, which have to be looked up.
99
+
The `niram-css` package offers a convenient and powerful way to use #link("https://www.w3.org/TR/css-color-3/#svg-color")[CSS/SVG colors] directly within Typst documents. Instead of manually looking up and entering RGB or Hex codes, users can simply refer to colors by their CSS names.
100
+
101
+
The word _niram_ (நிறம்), means "color" in #link("https://en.wikipedia.org/wiki/Tamil_language")[Tamil] and reflects the package's focus on colors.
100
102
101
103
== Easy Reference
102
104
103
105
For easy reference the CSS color names, their RGB/Hex codes, color swatches, and color stripes have been tabulated in @available-css-colors.
104
106
105
-
You may also view them in a browser by clicking on this #link("https://htmlpreview.github.io/?https://github.com/nandac/css-colors/blob/main/docs/css-colors-table.html")[link].
107
+
You may also view them in a browser by clicking on this #link("https://htmlpreview.github.io/?https://github.com/nandac/css-colors/blob/main/docs/niram-css-table.html")[link].
106
108
107
109
== Implementation
108
110
109
111
=== Function
110
112
111
-
The `css-colors` package provides a single function `css` defined as:
113
+
The `niram-css` package provides a single function `css` defined as:
112
114
113
115
```typ
114
116
css(
@@ -132,12 +134,12 @@ Since the returned value is of type `color`, it can be used with any of Typst's
132
134
133
135
== Usage
134
136
135
-
The following examples demonstrate the usage of the `css-colors` package in various cases:
137
+
The following examples demonstrate the usage of the `niram-css` package in various cases:
136
138
137
139
+ Coloring text with a CSS color.
138
140
139
141
```typ
140
-
#import "@preview/css-colors:0.1.0": *
142
+
#import "@preview/niram-css:0.1.0": *
141
143
142
144
Normal text may be #text(fill: css("crimson"))[colored so.]
143
145
```
@@ -147,7 +149,7 @@ The following examples demonstrate the usage of the `css-colors` package in vari
@@ -171,7 +173,7 @@ The following examples demonstrate the usage of the `css-colors` package in vari
171
173
+ The maroon color in Typst differs from the Maroon color defined in CSS, as evidenced by their distinct hex codes. To emphasize this distinction, the CSS `Maroon` is intentionally capitalized with an initial uppercase letter.
172
174
173
175
```typ
174
-
#import "@preview/css-colors:0.1.0": *
176
+
#import "@preview/niram-css:0.1.0": *
175
177
176
178
#grid(
177
179
columns: 3,
@@ -195,7 +197,7 @@ The following examples demonstrate the usage of the `css-colors` package in vari
195
197
+ CSS colors may also be used in the context of drawing and data visualization.
196
198
197
199
```typ
198
-
#import "@preview/css-colors:0.1.0": *
200
+
#import "@preview/niram-css:0.1.0": *
199
201
200
202
#align(center)[
201
203
#polygon.regular(
@@ -219,7 +221,7 @@ The following examples demonstrate the usage of the `css-colors` package in vari
219
221
+ CSS colors may be used to underline text.
220
222
221
223
```typ
222
-
#import "@preview/css-colors:0.1.0": *
224
+
#import "@preview/niram-css:0.1.0": *
223
225
224
226
This is #underline(stroke: css("teal"))[important.]
0 commit comments