Import formats
Palette generator
Shortcuts
What Pallete recognises as a colour, how text is grouped into palettes and where an import lands.
Ctrl/Cmd + V anywhere in the window except a text field — opens the dialog with the
clipboard already in it..txt, .md, .css and .scss are supported; the contents
land in the input.The dialog itself has three options: whether to prepend the line number to a colour name,
which separator to use for it (1. Name, 1 Name, 1 — Name) and the palette name an
unnamed list gets (empty → Imported).
| Format | Example | Note |
|---|---|---|
Hex with # | #fff, #66BB6A | 3 or 6 digits |
| Hex with alpha | #abcd, #11223380 | 4 or 8 digits, alpha last |
rgb() | rgb(102, 187, 106) | each channel 0–255 |
rgba() | rgba(0, 0, 0, 0.5) | alpha 0–1, clamped |
Hex without # | 66BB6A, 11223380 | only with the “accept hex without #” setting on, and only 6 or 8 digits |
| Hex + percent | #000000 15% | a percent right after the colour, or in the next cell, is read as alpha |
Short hex expands: #abc → #AABBCC, #abcd → #AABBCC plus alpha. A trailing percent wins
over the alpha inside the hex: #11223380 40% gives 0.4. Colours may be mixed in one line
and keep their order: #111 rgb(0,0,0) #222 yields three colours. An rgb() with a channel
above 255 is dropped whole.
hsl() / hsla() — HSL exists as a copy format only, not as an import format.red, white, cornflowerblue. In variables, $white: white; yields
nothing — it has to be $white: #fff;.rgb(255 0 0), rgb(100% 0% 0%), lab(), lch(), oklab(), oklch(),
color(), hwb().#.url(...), images or base64.If nothing is found, the preview says so and there is nothing to import.
The parser tries three shapes, in order.
Triggered by --name: …; or $name: …; declarations whose value contains a colour.
// Gray Scale, /* Status */) names a
palette, and every variable until the next such comment goes into it. Of several adjacent
comment lines the last non-empty one wins; a section with no variables under it creates
nothing.deep-blue-800
→ deep-blue. A prefix shared by two or more variables becomes a palette; singletons and
dashless names such as $white fall into a palette called Variables.$ocean-400: #40e0d0; // Main turquoise names the colour
ocean-400.// Gray Scale
$gray-50: #fafafa;
$gray-900: #171717;
// Primary Colors (Ocean Theme)
$ocean-400: #40e0d0; // Main turquoise
$ocean-500: #14b8a6;
$white: #fff;
$black: #1a1a1a;
→ Gray Scale, Primary Colors (Ocean Theme) and Variables with white and black.
Cell separators are tried in this order: a pipe | (Markdown and ASCII tables), a tab, two or
more spaces, then commas, semicolons or single spaces. Tabs and wide gaps keep multi-word
cells intact.
Palette 1,
Palette 2, …Everything found in the text goes into one palette in order of appearance, named from the
“palette name” field — Imported by default. This is the path a list of hex codes copied out
of a chat takes.
№ Factor HEX
1 Media competitors #BDBDBD
2 Base #000000 15%
3 Distribution #FFB300
→ one palette with the colour names 1. Media competitors, 2. Base, 3. Distribution, the
second one carrying alpha 0.15.
A leading cell of the form 1, 1., 1) or № 1 is treated as a number and never becomes
part of the name on its own; it is glued to the name only when the toggle is on. The remaining
text cells are joined with spaces, so a space-separated list works too. A cell that is only a
percent is read as alpha, not as part of the name.
name-1, name-2, …Importing works with no project open:
If an imported palette’s name matches an existing one (case-insensitively), the dialog reports the number of conflicts and offers merge (append the colours, the default), replace or skip. The whole import is one history step and undoes as one.
Up to 1 MB of pasted text and up to 10 000 colours per import. Above that the import is refused with a warning.