4.0.1 • Published 1 year ago

@rose-pine/palette v4.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Color palette tool for Rosé Pine

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

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.

.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

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

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-pine

variants.moon.key;
// => moon

variants.dawn.name;
// => Rosé Pine Dawn

roles.base.colors.main.hex;
// => '191724'

roles.surface.colors.dawn.rgb;
// => [255, 250, 243]

roles.highlightLow.id;
// => highlight-low

roles.highlightMed.key;
// => highlightMed

roles.highlightHigh.key;
// => 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

RoleDescriptionUsage
basePrimary backgroundinactive tabs, sidebars
surfaceLow contrast background atop basetext inputs, panels
overlayMedium contrast background atop surfacetext inputs, panels, active tabs
mutedLow contrast foregroundcomments, git ignored
subtleMedium contrast foregroundnon-selected results, inactive tabs, punctuation, operators
textHigh contrast foregroundcursor text, selected results, selection foreground (paired with highlightMed background), active tabs, variables
highlightLowLow contrast highlightcursor line
highlightMedMedium contrast highlightselection background (paired with text foreground)
highlightHighHigh contrast highlightcursor background, borders

Accent

RoleUsage
loveterminal red, builtins, errors, git delete
goldterminal yellow, strings, warnings
roseterminal cyan, booleans, git change, git dirty, git text
pineterminal green, functions, git rename
foamterminal blue, object keys, info, git add
iristerminal magenta, parameters, links, hints, git merge, git stage

Related

4.0.0-0

1 year ago

4.0.1-2

1 year ago

4.0.1-3

1 year ago

4.0.1-0

1 year ago

4.0.1-1

1 year ago

4.0.1-4

1 year ago

4.0.1-5

1 year ago

4.0.1

1 year ago

3.0.1

2 years ago

3.0.0

2 years ago

2.0.0-8

2 years ago

2.0.0-7

2 years ago

2.0.0-6

2 years ago

2.0.0-5

2 years ago

2.0.0-4

2 years ago

2.1.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.1.0

2 years ago

2.0.0-3

2 years ago

2.0.0-2

2 years ago

2.0.0-1

2 years ago

2.0.0-0

2 years ago

1.0.0

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago