Skip to content

Commit 412e593

Browse files
committed
Renamed all references to css-colors to niram-css
1 parent 875c0b6 commit 412e593

File tree

12 files changed

+37
-35
lines changed

12 files changed

+37
-35
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ to the corresponding tag on GitHub, or the diff
3737
in comparison to the previous release
3838
-->
3939

40-
[Unreleased]: https://github.com/nandac/css-colors/compare/v0.1.0...HEAD
41-
[0.1.0]: https://github.com/nandac/css-colors/releases/tag/v0.1.0
40+
[Unreleased]: https://github.com/nandac/niram-css/compare/v0.1.0...HEAD
41+
[0.1.0]: https://github.com/nandac/niram-css/releases/tag/v0.1.0

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# The `css-colors` Package
1+
# The `niram-css` Package
22
<!-- markdownlint-disable MD033 -->
33
<div align="center">Version 0.1.0</div>
44

@@ -9,7 +9,7 @@ Allows CSS/SVG named colors to be used directly in a Typst document.
99
These instructions will get you a copy of the project up and running on the Typst web app.
1010

1111
```typ
12-
#import "@preview/css-colors:0.1.0": *
12+
#import "@preview/niram-css:0.1.0": *
1313
1414
Normal text may be #text(fill: css("crimson"))[colored so.]
1515
```
@@ -36,17 +36,17 @@ Follow these steps to set up your development environment and prepare for contri
3636
Download the project's source code by cloning the repository to your local machine:
3737

3838
```bash
39-
git clone https://github.com/nandac/css-colors.git
39+
git clone https://github.com/nandac/niram-css.git
4040
```
4141

4242
Once you've completed these steps, your development environment will be ready.
4343
4444
### Next Steps
4545
46-
The `css-colors` package source code is located at:
46+
The `niram-css` package source code is located at:
4747
4848
```plaintext
49-
src/css-colors.typ
49+
src/niram-css.typ
5050
```
5151
5252
This is where you will make any necessary changes to the module.
@@ -61,7 +61,7 @@ just test
6161
6262
Ensure that all tests pass before submitting any changes to maintain the project's integrity.
6363

64-
If you want to test the module with a Typst file, you can install the `css-colors` package locally in the `preview` location by running:
64+
If you want to test the module with a Typst file, you can install the `niram-css` package locally in the `preview` location by running:
6565

6666
```bash
6767
just install-preview
@@ -70,17 +70,17 @@ just install-preview
7070
Once installed, you can import the package into your Typst file using the following statement:
7171

7272
```typ
73-
#import "@preview/css-colors:0.1.0": *
73+
#import "@preview/niram-css:0.1.0": *
7474
```
7575

7676
This setup allows you to experiment with the module in a Typst file before finalizing your changes.
7777

7878
## Usage
7979

80-
The following examples demonstrate the usage of the `css-colors` package in various cases:
80+
The following examples demonstrate the usage of the `niram-css` package in various cases:
8181

8282
```typ
83-
#import "@preview/css-colors:0.1.0": *
83+
#import "@preview/niram-css:0.1.0": *
8484
8585
#align(center)[
8686
#polygon.regular(

docs/manual.pdf

3.31 KB
Binary file not shown.

docs/manual.typ

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#import "@preview/css-colors:0.1.0": *
1+
#import "@preview/niram-css:0.1.0": *
22
// Global Styles
33
#set page(margin: 25mm)
44
#set text(size: 11pt, font: "Noto Serif")
@@ -36,7 +36,7 @@
3636

3737
// End of setup
3838

39-
= The `css-colors` Package
39+
= The `niram-css` Package
4040

4141
== History
4242

@@ -94,21 +94,23 @@ Typst ships with #link("https://typst.app/docs/reference/visualize/color/#predef
9494
The remaining seventeen colors have identical names, but---with the exception of `white` and `black`---they
9595
have different RGB/Hex values, as shown in @comparison-typst-css-colors.
9696

97-
== Purpose of Package
97+
== Purpose of the `niram-css` Package
9898

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.
100102

101103
== Easy Reference
102104

103105
For easy reference the CSS color names, their RGB/Hex codes, color swatches, and color stripes have been tabulated in @available-css-colors.
104106

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].
106108

107109
== Implementation
108110

109111
=== Function
110112

111-
The `css-colors` package provides a single function `css` defined as:
113+
The `niram-css` package provides a single function `css` defined as:
112114

113115
```typ
114116
css(
@@ -132,12 +134,12 @@ Since the returned value is of type `color`, it can be used with any of Typst's
132134

133135
== Usage
134136

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:
136138

137139
+ Coloring text with a CSS color.
138140

139141
```typ
140-
#import "@preview/css-colors:0.1.0": *
142+
#import "@preview/niram-css:0.1.0": *
141143
142144
Normal text may be #text(fill: css("crimson"))[colored so.]
143145
```
@@ -147,7 +149,7 @@ The following examples demonstrate the usage of the `css-colors` package in vari
147149
+ Filling a rectangle with a CSS color.
148150

149151
```typ
150-
#import "@preview/css-colors:0.1.0": *
152+
#import "@preview/niram-css:0.1.0": *
151153
152154
#rect(width: 100%, height: auto, fill: css("darkorchid"))
153155
```
@@ -157,7 +159,7 @@ The following examples demonstrate the usage of the `css-colors` package in vari
157159
+ CSS color names can be specified in lowercase or CamelCase so both `saddlebrown` and `SaddleBrown` are valid.
158160

159161
```typ
160-
#import "@preview/css-colors:0.1.0": *
162+
#import "@preview/niram-css:0.1.0": *
161163
162164
(a) saddlebrown: #box(width: 30mm, height: 1em, fill: css("saddlebrown"))
163165
@@ -171,7 +173,7 @@ The following examples demonstrate the usage of the `css-colors` package in vari
171173
+ 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.
172174

173175
```typ
174-
#import "@preview/css-colors:0.1.0": *
176+
#import "@preview/niram-css:0.1.0": *
175177
176178
#grid(
177179
columns: 3,
@@ -195,7 +197,7 @@ The following examples demonstrate the usage of the `css-colors` package in vari
195197
+ CSS colors may also be used in the context of drawing and data visualization.
196198

197199
```typ
198-
#import "@preview/css-colors:0.1.0": *
200+
#import "@preview/niram-css:0.1.0": *
199201
200202
#align(center)[
201203
#polygon.regular(
@@ -219,7 +221,7 @@ The following examples demonstrate the usage of the `css-colors` package in vari
219221
+ CSS colors may be used to underline text.
220222

221223
```typ
222-
#import "@preview/css-colors:0.1.0": *
224+
#import "@preview/niram-css:0.1.0": *
223225
224226
This is #underline(stroke: css("teal"))[important.]
225227

docs/thumbnail-2.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#import "@preview/css-colors:0.1.0": *
1+
#import "@preview/niram-css:0.1.0": *
22

33
#set page(height: auto, margin: 5mm, fill: none)
44

docs/thumbnail.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#import "@preview/css-colors:0.1.0": *
1+
#import "@preview/niram-css:0.1.0": *
22

33
#set page(height: auto, margin: 5mm, fill: none)
44

File renamed without changes.

tests/case-insensitivity/test.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#import "/src/css-colors.typ": *
1+
#import "/src/niram-css.typ": *
22

33
#assert.eq(
44
css("AliceBlue"),

tests/error-cases/test.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#import "/src/css-colors.typ": *
1+
#import "/src/niram-css.typ": *
22

33
#assert.eq(
44
catch(() => css("invalidcolor")),

tests/fill-shape/test.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#import "/src/css-colors.typ": *
1+
#import "/src/niram-css.typ": *
22

33
#assert.eq(
44
rect(width: 100%, height: auto, fill: css("darkorchid")),

0 commit comments

Comments
 (0)