loading [
0%
]
EN
☽
EN
RU
☀
☽

Import formats

What Pallete recognises as a colour, how text is grouped into palettes and where an import lands.


Opening the import dialog

  • The import dialog inside the app — paste text on the left, the recognised palettes appear on the right immediately.
  • Ctrl/Cmd + V anywhere in the window except a text field — opens the dialog with the clipboard already in it.
  • Drop a file into the window — .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).

What counts as a colour

FormatExampleNote
Hex with ##fff, #66BB6A3 or 6 digits
Hex with alpha#abcd, #112233804 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, 11223380only 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.

What is not recognised

  • hsl() / hsla() — HSL exists as a copy format only, not as an import format.
  • Named CSS colours: red, white, cornflowerblue. In variables, $white: white; yields nothing — it has to be $white: #fff;.
  • Modern notations: rgb(255 0 0), rgb(100% 0% 0%), lab(), lch(), oklab(), oklch(), color(), hwb().
  • A 3-digit hex without #.
  • Anything inside url(...), images or base64.

If nothing is found, the preview says so and there is nothing to import.

How text is grouped

The parser tries three shapes, in order.

1. CSS / SCSS variables

Triggered by --name: …; or $name: …; declarations whose value contains a colour.

  • By section comments. A whole-line comment (// 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.
  • By name prefix. Variables before the first section comment — or all of them, if there are no comments — are grouped by the part of the name before the last dash: 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.
  • Trailing comments are dropped: $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.

2. Tables

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.

  • The first row is a header if it contains no colour.
  • The first column holds palette names if most of its cells are not colours.
  • Exactly one colour per row (and at least two rows) means a list: the whole table becomes one palette and each row’s text becomes a colour name.
  • Otherwise every row becomes its own palette, named from its first cell or Palette 1, Palette 2, …

3. A plain list of colours

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.

Numbered lists

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

Colour names

  • CSS / SCSS — the variable name. If one value holds several colours, the first takes the variable name and the rest become name-1, name-2, …
  • Tables — the text cells of the row; failing that, the text next to the colour inside its cell (after it, or before it if there is nothing after).
  • A bare list of colours has no names.

Where the import lands

Importing works with no project open:

  • no projects at all → the New project dialog opens, and the palettes go into it once it is created — the text does not have to be entered again;
  • exactly one project → a confirmation “save into X?”, with “no, new project” as the alternative;
  • several projects → a project picker with a ”+ New project” button.

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.

Limits

Up to 1 MB of pasted text and up to 10 000 colours per import. Above that the import is refused with a warning.