hcb-geo-pattern
Version:
Create beautiful generative geometric background images from a string.
57 lines (37 loc) • 1.16 kB
Markdown

This is a fork of the original `@prescott/geo-pattern` TypeScript library with one added feature: **grayscale generation**. It is specifically tailored for [HCB Mobile](https://github.com/hackclub/hcb-mobile) and generates patterns that perfectly match the Ruby version of GeoPattern used in HCB ([hackclub/hcb](https://github.com/hackclub/hcb)).
https://mooyoul.github.io/geo-pattern/
```bash
$ npm install hcb-geo-pattern --save
```
```typescript
interface GeneratePatternParams {
input: string;
patterns?: string[];
color?: string;
baseColor?: string;
grayscale?: number;
}
interface Pattern {
background?: Background;
structure?: Structure;
width: number;
height: number;
toSVG(): string;
toDataURL(): string;
}
```
```bash
$ npm run build
```
geo-pattern was originally written by [Jason Long](https://github.com/jasonlong).
[](LICENSE)
See full license on [mooyoul.mit-license.org](http://mooyoul.mit-license.org/)