Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rose-pine/palette
Color palette tool for Rosé Pine
https://github.com/rose-pine/palette
color css palette rose-pine soho-vibes
Last synced: 4 days ago
JSON representation
Color palette tool for Rosé Pine
- Host: GitHub
- URL: https://github.com/rose-pine/palette
- Owner: rose-pine
- License: mit
- Created: 2021-06-25T16:26:39.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-10T19:30:30.000Z (over 1 year ago)
- Last Synced: 2024-10-31T04:18:33.681Z (19 days ago)
- Topics: color, css, palette, rose-pine, soho-vibes
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@rose-pine/palette
- Size: 131 KB
- Stars: 17
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
Rosé Pine Palette
All natural pine, faux fur and a bit of soho vibes for the classy minimalist
> Color palette tool for Rosé Pine
- [Usage](#usage)
- [CSS variables](#css-variables)
- [Tailwind CSS](#tailwind-css)
- [JavaScript](#javascript)
- [Specification](#specification)
- [Variants](#variants)
- [Roles](#roles)
- [Related](#related)## Usage
### CSS variables
**Media**
> See `dist/css/rose-pine-media{-rgb,-hsl}.css`
Useful for light/dark theming. Values follow the user's system theme, using
the dawn variant when light and main variant when dark. Moon values can be
uncommented and used instead.**Classes**
> See `dist/css/rose-pine-class{-rgb,-hsl}.css`
Useful for theming with more than two options. Values are set based on a
wrapping class of `.theme-rp{-moon,-dawn}`.```css
body {
color: var(--rp-text);
background: var(--rp-base);
}
```**Static**
> See `dist/css/rose-pine{-rgb,-hsl}.css`
Useful when flexibility is desired. Values include their variant's name for moon and
dawn, allowing all variants to be individually referenced.```css
.link-main {
color: var(--rp-iris);
}
.link-moon {
color: var(--rp-moon-iris);
}
.link-dawn {
color: var(--rp-dawn-iris);
}
```### Tailwind CSS
**Preset configuration**
> See `dist/tailwind/rose-pine{-media}.js`
```js
// tailwind.config.js
module.exports = {
presets: [require("./rose-pine.js")],
};
```If using `rose-pine-media.js`, see the section below to include the necessary
CSS variables.**CSS variables**
> See `dist/css/rose-pine-media-tailwind.css`
This method sets CSS variables to raw HSL values to support alpha values in
classes, e.g. `bg-rose/50`.### JavaScript
Starting with v4, colour values are unformatted. Formatted values can be found
in our `dist` folder. For creating new themes, it is recommended to use our
[build tool](https://github.com/rose-pine/build).```js
import {variants, roles} from "@rose-pine/palette";variants.moon.colors.highlightLow.hsl
// => [245, 22, 20]variants.moon.colors.highlightLow.alpha.hsl
// => [249, 14%, 55%, 0.08]variants.main.id
// => rose-pinevariants.moon.key
// => moonvariants.dawn.name
// => Rosé Pine Dawnroles.base.colors.main.hex
// => '191724'roles.surface.colors.dawn.rgb
// => [255, 250, 243]roles.highlightLow.id
// => highlight-lowroles.highlightMed.key
// => highlightMedroles.highlightHigh.name
// => Highlight High
```## Specification
### Variants
Rosé Pine includes three variants. These are referenced as Rosé Pine, Rosé
Pine Moon, and Rosé Pine Dawn. Their codenames are main, moon, and dawn
respectively. Naming does not include "main" unless necessary. When used as
file names, prefer snake-case. E.g. rose-pine, rose-pine-moon, and
rose-pine-dawn.### Roles
**Neutral**
| Role | Description | Usage |
| --------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `base` | Primary background | inactive tabs, sidebars |
| `surface` | Low contrast background atop `base` | text inputs, panels |
| `overlay` | Medium contrast background atop `surface` | text inputs, panels, active tabs |
| `muted` | Low contrast foreground | comments, git ignored |
| `subtle` | Medium contrast foreground | non-selected results, inactive tabs, punctuation, operators |
| `text` | High contrast foreground | cursor text, selected results, selection foreground (paired with `highlightMed` background), active tabs, variables |
| `highlightLow` | Low contrast highlight | cursor line |
| `highlightMed` | Medium contrast highlight | selection background (paired with `text` foreground) |
| `highlightHigh` | High contrast highlight | cursor background, borders |**Accent**
| Role | Usage |
| ------ | ---------------------------------------------------------------- |
| `love` | terminal red, builtins, errors, git delete |
| `gold` | terminal yellow, strings, warnings |
| `rose` | terminal cyan, booleans, git change, git dirty, git text |
| `pine` | terminal green, functions, git rename |
| `foam` | terminal blue, object keys, info, git add |
| `iris` | terminal magenta, parameters, links, hints, git merge, git stage |## Related
- [rosepinetheme.com/palette](https://rosepinetheme.com/palette)
- [@rose-pine/build](https://github.com/rose-pine/build)