Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Chromagen #10

Merged
merged 5 commits into from
Oct 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
changelog:
categories:
- title: 🆕 Features
labels:
- '*'
exclude:
labels:
- dependencies
- title: 🧱 Dependencies
labels:
- dependencies
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# [0.7.0](https://github.com/famebot/chromagen/compare/v0.6.0...v0.7.0) (2023-10-15)


### Features

* rename chromagen ([7efc2e3](https://github.com/famebot/chromagen/commit/7efc2e3f766d3f40def68e2d4bb34cf58a004f3f))



# [0.6.0](https://github.com/famebot/hsl-gen/compare/v0.5.1...v0.6.0) (2023-04-09)


Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
# HSL Gen
# Chromagen

HSL Gen (`hsl-gen`) generates HSL color schemes.
Chromagen generates HSL color schemes.

- [Demo](https://hsl-gen.netlify.app)
- [HSL Gen on GitHub](https://github.com/famebot/hsl-gen)
- [@famebot/hsl-gen on npm](https://www.npmjs.com/package/@famebot/hsl-gen)
- [Demo](https://chromagen.io)
- [Chromagen on GitHub](https://github.com/famebot/chromagen)
- [@famebot/chromagen on npm](https://www.npmjs.com/package/@famebot/chromagen)

[![npm Version](https://img.shields.io/npm/v/@famebot/hsl-gen.svg?style=for-the-badge)](https://www.npmjs.com/package/@famebot/hsl-gen)   [![GitHub issues](https://img.shields.io/github/issues/famebot/hsl-gen.svg?style=for-the-badge)](https://github.com/famebot/hsl-gen/issues)
[![npm Version](https://img.shields.io/npm/v/@famebot/chromagen.svg?style=for-the-badge)](https://www.npmjs.com/package/@famebot/chromagen)   [![GitHub issues](https://img.shields.io/github/issues/famebot/chromagen.svg?style=for-the-badge)](https://github.com/famebot/chromagen/issues)

## Installation and Usage

HSL Gen uses [Microbundle](https://github.com/developit/microbundle) to produce ESM ([ECMAScript modules](https://nodejs.org/api/esm.html)), CJS ([CommonJS](https://nodejs.org/api/modules.html)), and UMD ([Universal Module Definition](https://github.com/umdjs/umd)) bundles that work in various environments.
Chromagen uses [Microbundle](https://github.com/developit/microbundle) to produce ESM ([ECMAScript modules](https://nodejs.org/api/esm.html)), CJS ([CommonJS](https://nodejs.org/api/modules.html)), and UMD ([Universal Module Definition](https://github.com/umdjs/umd)) bundles that work in various environments.

### Node.js and similar environments

```bash
npm i @famebot/hsl-gen
npm i @famebot/chromagen
```

```js
import hslGen from '@famebot/hsl-gen';
const colorScheme = hslGen();
import chromagen from '@famebot/chromagen';
const colorScheme = chromagen();
console.log(colorScheme);
```

CommonJS `require` syntax:

```js
const hslGen = require('@famebot/hsl-gen');
const colorScheme = hslGen();
const chromagen = require('@famebot/chromagen');
const colorScheme = chromagen();
console.log(colorScheme);
```

### Browser use client-side

For browser use, include `dist/hsl-gen.umd.js` or use [unpkg](https://unpkg.com), which `examples/browser-umd/index.html` demonstrates. View the latest version at <https://hsl-gen.netlify.app>
For browser use, include `dist/chromagen.umd.js` or use [unpkg](https://unpkg.com), which `examples/browser-umd/index.html` demonstrates. View the latest version at <https://chromagen.netlify.app>

Latest UMD bundle on unpkg:
<https://unpkg.com/@famebot/hsl-gen/dist/hsl-gen.umd.js>
<https://unpkg.com/@famebot/chromagen/dist/chromagen.umd.js>

Using the UMD bundle in the browser:

```html
<script src="https://unpkg.com/@famebot/hsl-gen/dist/hsl-gen.umd.js"></script>
<script src="https://unpkg.com/@famebot/chromagen/dist/chromagen.umd.js"></script>
<script>
const colorScheme = hslGen();
const colorScheme = chromagen();
console.log(colorScheme);
</script>
```
Expand Down
2 changes: 1 addition & 1 deletion dist/hsl-gen.cjs → dist/chromagen.cjs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
var l=function(l,h){return Math.floor(Math.random()*(h-l+1))+l};module.exports=function(){var h,s=l(1,359),a=s>180?s-180:s+179;switch(s){case s<135:h=s+224;break;case s>224:h=s-223;break;default:var r=s+225;h=r>359?r-359:r}var e=l(80,100),d=l(64,80),n=l(0,24),o=n<8?16:0,t=d>76?68:84,u=l(28,36),i=l(48,64),m=l(84,92);return{hue:s,complement:a,analogous:h,saturation:e,xlight:m,lighter:t,lightness:d,midrange:i,lowmid:u,darkness:n,darker:o,huehsl:"hsl("+s+", "+e+"%, "+d+"%)",huehsllighter:"hsl("+s+", "+e+"%, "+t+"%)",huehslxlight:"hsl("+s+", "+e+"%, "+m+"%)",darkhuehsl:"hsl("+s+", "+e+"%, "+n+"%)",darkhuehsldarker:"hsl("+s+", "+e+"%, "+o+"%)",darkhuehsllowmid:"hsl("+s+", "+e+"%, "+u+"%)",comphsl:"hsl("+a+", "+e+"%, "+d+"%)",comphslmid:"hsl("+a+", "+e+"%, "+i+"%)",comphsldark:"hsl("+a+", "+e+"%, "+n+"%)",comphsldarker:"hsl("+a+", "+e+"%, "+o+"%)",analhsl:"hsl("+h+", "+e+"%, "+d+"%)",analhslmid:"hsl("+h+", "+e+"%, "+i+"%)",analhsldark:"hsl("+h+", "+e+"%, "+n+"%)",analhsldarker:"hsl("+h+", "+e+"%, "+o+"%)"}};
//# sourceMappingURL=hsl-gen.cjs.map
//# sourceMappingURL=chromagen.cjs.map
1 change: 1 addition & 0 deletions dist/chromagen.cjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/hsl-gen.modern.js → dist/chromagen.modern.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/chromagen.modern.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/hsl-gen.module.js → dist/chromagen.module.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading