- Python 95.1%
- Shell 4.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .claude | ||
| AyuDark | ||
| AyuDarkTransparent | ||
| color-scheme | ||
| licenses | ||
| palette | ||
| screenshots | ||
| generate.py | ||
| install.sh | ||
| LICENSE | ||
| README.md | ||
AyuDark — a Kvantum theme + KDE colour scheme
A Qt/Kvantum widget theme matching the Ayu (Dark) colorscheme: near-black
blue-grey surfaces, warm grey text, gold accent. Ships with a companion KDE
colour scheme, since Kvantum styles Qt widgets but Plasma's own shell, KWin
decorations and parts of KDE apps read KColorScheme instead.
Install
./install.sh # copy both into place
./install.sh --activate # ...and switch to them
Manually, if you prefer:
cp -r AyuDark ~/.config/Kvantum/
cp color-scheme/AyuDarkKvantum.colors ~/.local/share/color-schemes/
kvantummanager --set AyuDark
plasma-apply-colorscheme AyuDarkKvantum
Outside a KDE session you also need QT_STYLE_OVERRIDE=kvantum in your
environment for Qt apps to load the engine. Restart Qt apps to pick up changes.
What's here
| path | |
|---|---|
AyuDark/AyuDark.kvconfig |
theme config: palette, per-widget text colors, metrics |
AyuDark/AyuDark.svg |
the widget graphics |
color-scheme/AyuDarkKvantum.colors |
KDE colour scheme, listed as "Ayu Dark (Kvantum)" |
generate.py |
regenerates all three — edit this, not the output |
install.sh |
per-user installer |
palette/dark.yaml |
verbatim copy of ayu-colors themes/dark.yaml, the palette source |
licenses/ |
upstream license texts (ayu-colors MIT, Kvantum GPL-3.0) |
How it was built
Kvantum themes are SVG-driven, so the widget geometry (corner radii, frame
insets, gradients, every arrow and grip) is drawing work, independent of color.
Rather than redraw it, generate.py uses KvArcDark as a geometry donor and
remaps its colors: it's a flat dark theme whose whole palette is one blue-grey
lightness ramp plus a single accent hue, which makes a principled remap possible
instead of a per-element guess.
Every color is classified into one of four families:
| family | source | mapped to |
|---|---|---|
| A surfaces | blue-greys, S < 20%, H 195–265° |
Ayu's surface ramp, hue 220° |
| B accent | S ≥ 40%, H 190–265° |
Ayu's gold, hue 40° — lightness preserved |
| C specials | other saturated hues | the matching Ayu color (red, purple) |
| D glyphs | achromatic greys | warm neutrals in the Ayu foreground family |
Family A is the interesting one. Its lightness curve is anchored so that six of the donor's structural colors land exactly on real Ayu palette values:
| KvArcDark | role | AyuDark | Ayu name |
|---|---|---|---|
#22252e |
frames, borders | #080b0f |
surface.base -L0.1 |
#383c4a |
window background | #0d1017 |
surface.base |
#404552 |
base / list background | #10141c |
surface.lift |
#474d5d |
hover | #161b24 |
editor.line |
#505666 |
pressed, grooves | #1b2029 |
ui.line |
#92959d |
window-decoration glyphs | #5a6477 |
ui.fg |
#5294e2 |
accent | #e6b34e |
common.accent.tint |
Everything else interpolates between those anchors, so the donor's state relationships (normal → hover → pressed always gets lighter) survive intact while the absolute values become Ayu's.
Text on the accent
The one place a mechanical remap isn't enough. KvArcDark's accent is a mid
blue carrying near-white text; Ayu's is a light gold, so that text has to flip
dark. The catch is Kvantum's inherits= chain: PanelButtonCommand is both the
pushbutton section and the base of a dozen others whose background never becomes
the accent, so a blanket change would put dark text on checkbox and tab labels
sitting on the window background.
generate.py therefore flips text per section, based on which interiors the SVG
actually paints with the accent:
- dark text —
PanelButtonCommand(pressed/toggled),MenuItem,MenuBarItem,ItemView,ToolboxTab,HeaderSection(pressed) - light text, explicitly restored —
CheckBox,RadioButton,IndicatorSpinBox,Toolbar,Dock,DockTitle,GroupBox,TitleBar,Menu,Tab
The SVG also gains menuitem-focused* / menubaritem-focused* aliases onto the
existing -toggled* elements. No shipped Kvantum theme defines those, so the
engine resolves menu hover through -toggled/-pressed; the aliases guarantee
the gold background is drawn whichever status the engine picks — which matters
precisely because those sections' focus text is now dark.
The KDE colour scheme
Generated from the same palette constants, so the two agree where they overlap:
Colors:Window / Colors:View / Colors:Button backgrounds are byte-identical
to window.color / base.color / button.color in the kvconfig. Structure
matches BreezeDark.colors exactly — all twelve sections including Plasma 6's
Colors:Header, Colors:Header][Inactive] and Colors:Complementary.
| group | background | from |
|---|---|---|
Window |
#0d1017 |
surface.base |
View |
#10141c |
surface.lift |
Button |
#12171f |
matches the SVG's button interior |
Tooltip |
#0f131a |
ui.popup.bg |
Header |
#141821 |
ui.panel.bg |
Complementary |
#080a0f |
surface.sunk |
Selection |
#e6b450 |
common.accent.tint |
Foregrounds come straight from the Ayu syntax colors — link #59c2ff, visited
#d2a6ff, negative #f07178, neutral #ffb454, positive #aad94c.
The Selection group needed real work rather than a copy. Its background is the
light gold accent, so foregrounds tuned for a dark surface would be
unreadable on it. darken_onto() walks each hue's lightness down only as far as
4.5:1 against the gold requires, keeping it as recognisably itself as possible,
and emit_color_scheme() asserts the result — so the build fails rather than
silently shipping unreadable selected text. (It caught one on the first run.)
generate.py prints a contrast audit for every group. Everything clears 4.5:1
except ForegroundInactive, which sits at ~3:1 because it is Ayu's ui.fg
(#5a6378) — the palette's own dim inactive-UI color. Kept for fidelity;
raise its lightness in DARK_GROUP_FG if you'd rather have the contrast.
Regenerating
python3 generate.py
Requires /usr/share/Kvantum/KvArcDark (Fedora: bundled with kvantum).
Prints the contrast audit and the full source → target color table.
To retune, edit SURFACE_ANCHORS (the lightness/saturation curve),
TEXT_OVERRIDES (per-section text colors) or AYU / DARK_GROUP_FG (the
palette) — not the generated files.
Verification
The Kvantum theme was rendered with kvantumpreview against a sandboxed
XDG_CONFIG_HOME, across all six widget pages plus an open menu, confirming:
gold accent with readable dark text on buttons, toggled tool buttons,
checkboxes, radios, sliders, progress bars, table selections, menu bar items and
menu items; light text preserved on checkbox/radio/tab labels; disabled states
legible.
The colour scheme is checked structurally against BreezeDark.colors (no
missing sections or keys, all values valid RGB triplets) and by the contrast
audit above.
Note on the existing AyuDark.colors
~/.local/share/color-schemes/AyuDark.colors already contained an unrelated Ayu
scheme. This one is deliberately named AyuDarkKvantum so it installs alongside
rather than over it. The two differ: the pre-existing file uses Ayu's teal
(#94e6ca) as its selection/decoration color, which clashes with this Kvantum
theme's gold, and its BackgroundAlternate values for Window, Button and
Tooltip are light-theme leftovers (248,248,248, 252,252,252, 230,230,230).
Delete it if you don't want the duplicate entry.
Credits & license
Palette — ayu-colors by Konstantin
Pschera, MIT. palette/dark.yaml is a verbatim copy of that project's
themes/dark.yaml; every color here derives from it. The MIT notice is retained
at licenses/ayu-colors.MIT.txt and must stay with any redistribution, since
the palette values are substantially reproduced in the generated files.
Widget geometry — KvArcDark by Tsu Jan,
GPL-3.0-or-later. Only colors were changed, so AyuDark/AyuDark.svg and
AyuDark/AyuDark.kvconfig are derivative works and stay GPL-3.0-or-later.
color-scheme/AyuDarkKvantum.colors contains no KvArcDark-derived content and is
MIT; its [ColorEffects:*] tuning follows BreezeDark.colors (KDE,
LGPL-2.0-or-later). generate.py / install.sh are MIT.
MIT is GPL-compatible, so the repository as a whole is redistributable under GPL-3.0-or-later. See LICENSE for the full breakdown.
