/* ==UserStyle== @name Lichess Catppuccin @namespace github.com/catppuccin/userstyles/styles/lichess @homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/lichess @version 2025.09.19 @updateURL https://github.com/catppuccin/userstyles/raw/main/styles/lichess/catppuccin.user.less @supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Alichess @description Soothing pastel theme for Lichess @author Catppuccin @license MIT @preprocessor less @var select lightFlavor "Light Flavor" ["latte:Latte*", "frappe:Frappé", "macchiato:Macchiato", "mocha:Mocha"] @var select darkFlavor "Dark Flavor" ["latte:Latte", "frappe:Frappé", "macchiato:Macchiato", "mocha:Mocha*"] @var select accentColor "Accent" ["rosewater:Rosewater", "flamingo:Flamingo", "pink:Pink", "mauve:Mauve*", "red:Red", "maroon:Maroon", "peach:Peach", "yellow:Yellow", "green:Green", "teal:Teal", "blue:Blue", "sapphire:Sapphire", "sky:Sky", "lavender:Lavender", "subtext0:Gray"] @var select lastMoveColor "Last Move" ["rosewater:Rosewater", "flamingo:Flamingo", "pink:Pink", "mauve:Mauve", "red:Red*", "maroon:Maroon", "peach:Peach", "yellow:Yellow", "green:Green", "teal:Teal", "blue:Blue", "sapphire:Sapphire", "sky:Sky", "lavender:Lavender", "subtext0:Gray"] @var select checkColor "Check Indicator" ["rosewater:Rosewater", "flamingo:Flamingo", "pink:Pink", "mauve:Mauve", "red:Red*", "maroon:Maroon", "peach:Peach", "yellow:Yellow", "green:Green", "teal:Teal", "blue:Blue", "sapphire:Sapphire", "sky:Sky", "lavender:Lavender", "subtext0:Gray"] @var checkbox stylePieces "Style Pieces" 1 @var checkbox styleBoard "Style Board" 1 ==/UserStyle== */ @import "https://userstyles.catppuccin.com/lib/lib.less"; @-moz-document domain("lichess.org") { :root:has(body[data-theme="light"]) { #catppuccin(@lightFlavor); } :root:has(body[data-theme="dark"]) { #catppuccin(@darkFlavor); } :root:has(body[data-theme="system"]) { @media (prefers-color-scheme: light) { #catppuccin(@lightFlavor); } @media (prefers-color-scheme: dark) { #catppuccin(@darkFlavor); } } #catppuccin(@flavor) { #lib.palette(); #lib.defaults(); @lastMove: @catppuccin[@@flavor][@@lastMoveColor]; @check: @catppuccin[@@flavor][@@checkColor]; &, body { background: @base linear-gradient(to bottom, @crust, @base 116px) no-repeat; color: @text !important; } /* Button */ .site-title a { color: @accent; } .site-title span { color: @text; } /* Game selection menus */ .hooks__list td { background-color: fade(@overlay0, 50%); } .hooks__list tr.join:hover td { background-color: fade(@accent, 50%); } /* Topbar */ #topnav.hover section:hover > a, #topnav section:active > a, #topnav div, .site-buttons .shown .toggle, .site-buttons .dropdown { background: @crust; } #topnav section > a { color: @subtext0; } #topnav.hover section:hover > a, #topnav section:active > a, #topnav div a, #dasher_app .selector button, #dasher_app .head, #dasher_app .piece .no-square, #dasher_app .theme .list button, #dasher_app .links a, #dasher_app .links button, #dasher_app .subs .sub, .site-buttons .dropdown a, .site-buttons .dropdown button { color: @text; } #topnav.hover section:hover > a, #topnav section:active > a, #topnav div { border-left-color: @accent; } signal > i { background-color: @green; } #dasher_app .sub::before, .is-green::before { color: @green; } #challenge-app .empty { background: @crust; } /* Popup skining */ dialog { background: @crust; } .game-setup .optional-config, .game-setup .ratings { background: @base; } .game-setup .radio input:checked + label { background: @green; } /* Text */ .site-buttons .link, .button, .input, .optgroup, .select, .textarea, .lobby__box td.name a, .lobby__box__top .title, .lobby__box .user-link, .mini-game, .mini-game:hover, .text, .ublog-post-card__title, .lobby__counters a, .lobby__streams .stream, .lobby__timeline .entry a, .lobby__about a, .lobby__timeline, .lobby__counters, .tabs-horiz, .lobby__streams .more, .lobby__timeline .more, .dialog-content, button, input, optgroup, select, textarea { color: @subtext0; } .site-buttons .link:hover, .button.button-metal:hover, .radio input:checked + label { color: @text; } .site-title-nav__donate, .lobby__streams .stream.highlight strong, .utitle, .lobby__support__text, .lobby__support i::before { color: @peach; } .mini-game__clock.clock--run, .tabs-horiz span.active { color: @red; } .tabs-horiz span.active, .tabs-horiz span:hover { border-color: @red; } a { color: @blue; } /* Links */ .lobby__timeline .entry:hover a, a:hover, a:active, a:focus { color: @accent; } /* Homepage cards */ .lobby__app__content, .box { background-color: @mantle; } .lpools > div { background: fade(@crust, 20%); border-color: @surface0; &:hover { background-color: fade(@accent, 20%); } } .hook__filters { background-color: fade(@mantle, 50%); } .lobby__support a { background: @crust; } .lobby__support a:hover { background: @peach; } .lobby__support a:hover i::before, .lobby__support a:hover .lobby__support__text { color: @mantle; } .lobby__box__top, #hook .opponent, .lobby__box__content, .ublog-post-card, .button, .tour-spotlight { background: @mantle !important; } .unread { background: @red; } .lobby__box tr:nth-child(even) { background: @crust; } /* Non-main page sidebar nav colors */ .subnav a.active { color: @red; } .subnav a.active::after, .subnav a:hover::after { background: @red; } /* Blog cards */ .blog-cards > a { background: @crust; } /* Learn tab */ .learn-stages .stage.done { background: @green; } .learn-stages .stage.ongoing, .learn__side-home { background: @blue; } .learn-stages .stage.future { background: @red; } /* Chess Game */ @light-cell: if(@flavor = latte, @surface0, @accent); @dark-cell: if(@flavor = latte, @accent, @surface0); & when (@styleBoard = 1) { /* Board */ .is2d cg-board::before { @svg: escape( '' ); background-image: url("data:image/svg+xml,@{svg}") !important; } /* File and Rank Coords */ .orientation-white .files coord:nth-child(2n+1), .orientation-white .ranks coord:nth-child(2n), .orientation-black .files coord:nth-child(2n), .orientation-black .ranks coord:nth-child(2n+1) { color: @light-cell; } .orientation-white .files coord:nth-child(2n), .orientation-white .ranks coord:nth-child(2n+1), .orientation-black .files coord:nth-child(2n+1), .orientation-black .ranks coord:nth-child(2n) { color: @dark-cell; } /* Squares */ square { &.move-dest { background: radial-gradient( @overlay1 19%, rgba(0, 0, 0, 0) 20% ); } &.selected { background: fade(@accent, 50%); } &.last-move { background-color: fade(@lastMove, 75%); } &.check { background: radial-gradient( ellipse at center, @check 0%, @check 25%, fade(@check, 0%) 89%, fade(@check, 0%) 100% ); } /* Capture indicator */ &.oc.move-dest { background: radial-gradient( transparent 0%, transparent 79%, fade(@overlay1, 50%) 80% ); } } /* Analysis Arrows */ svg.cg-shapes g { &[cgHash*="green"] { filter: @green-filter; } &[cgHash*="paleBlue"] { filter: @sky-filter; } &[cgHash*="red"] { filter: @red-filter; } } } & when (@stylePieces = 1) { @w-piece-fill: if(@flavor = latte, @mantle, @text); @b-piece-fill: if(@flavor = latte, @text, @mantle); @w-piece-stroke: if(@flavor = latte, @text, @mantle); @b-piece-stroke: if(@flavor = latte, @mantle, @text); .is2d .pawn { #piece(@f, @s) { @svg: escape( '' ); background-image: url("data:image/svg+xml,@{svg}") !important; } &.black { #piece(@b-piece-fill, @b-piece-stroke); } &.white { #piece(@w-piece-fill, @w-piece-stroke); } } .is2d .bishop { #piece(@f, @s) { @svg: escape( '' ); background-image: url("data:image/svg+xml,@{svg}") !important; } &.black { #piece(@b-piece-fill, @b-piece-stroke); } &.white { #piece(@w-piece-fill, @w-piece-stroke); } } .is2d .knight { #piece(@f, @s) { @svg: escape( '' ); background-image: url("data:image/svg+xml,@{svg}") !important; } &.black { #piece(@b-piece-fill, @b-piece-stroke); } &.white { #piece(@w-piece-fill, @w-piece-stroke); } } .is2d .rook { #piece(@f, @s) { @svg: escape( '' ); background-image: url("data:image/svg+xml,@{svg}") !important; } &.black { #piece(@b-piece-fill, @b-piece-stroke); } &.white { #piece(@w-piece-fill, @w-piece-stroke); } } .is2d .king { #piece(@f, @s) { @svg: escape( '' ); background-image: url("data:image/svg+xml,@{svg}") !important; } &.black { #piece(@b-piece-fill, @b-piece-stroke); } &.white { #piece(@w-piece-fill, @w-piece-stroke); } } .is2d .queen { #piece(@f, @s) { @svg: escape( '' ); background-image: url("data:image/svg+xml,@{svg}") !important; } &.black { #piece(@b-piece-fill, @b-piece-stroke); } &.white { #piece(@w-piece-fill, @w-piece-stroke); } } } .rclock .time { background: @mantle; color: @text; } .rclock.running .time { background: #384722; /* putting it back to default so that the time on the clock is readable */ } .rclock .bar { background: @accent; } /* Game Cards */ .game__meta, .round__app__table { background: @crust; } rm6 { background: @mantle; } rm6 .buttons, rm6 i5z { background: @base; } /* Messages */ .msg-app__convo__head, .msg-app__side__search, .msg-app__convo__reply { background: @crust; } .msg-app__side { background: @mantle; } .msg-app__side__search input, .msg-app__convo__post__text { background: @base; } .msg-app__side__contact__name { color: @text; } .msg-app__side__contact__msg, .msg-app__side__contact__date time { color: @subtext0; } /* User dropdown */ #powerTip, #miniGame, #miniBoard { background: @crust; } .btn-rack__btn, .btn-rack form, #friend_box .friend_box_title, .button.button-metal, .button.button-empty:not(.disabled):hover, .button.button-empty.button-green:not(.disabled):hover, .button.button-empty.button-red:not(.disabled):hover { background: @base; } /* User Page */ .user-show__header, .user-show__social, .user-show .angles, .cmn-toggle:hover:not(:disabled) + label::after, .cmn-toggle + label::after, .crosstable povs:hover, .crosstable__users, .crosstable__score, .game-row:nth-child(odd), .number-menu--tabs .nm-item.active { background: @crust; } .number-menu--tabs .nm-item.active, .user-show .number-menu .to-games.active, .user-show #games.number-menu { background: @mantle !important; } /* Stats */ .perf-stat .counter tr.full td:last-child { background: @crust; } .sub-ratings a.active { background: @mantle; } .sub-ratings a[href]:hover { background: @crust; } /* Analysis page */ .analyse__clock, #analyse-cm .title, .explorer__config .choices button, .mselect__label, .cmn-toggle:hover:not(:disabled) + label::after, .cmn-toggle + label::after, .crosstable povs:hover, .crosstable__users, .crosstable__score, .mselect__list, .analyse__tools .comp-off__hint, .ceval, .explorer-box tr:nth-child(even), .board-editor__tools .metadata, .mchat__content, .mchat__tab-active, .crosstable fill { background: @crust !important; } .analyse__tools, .copyable, .pv_box, #ceval-settings { background: @mantle; } .ceval .settings-gear.active { background-color: @accent; } #ceval-settings { border-top-color: @accent; } .mchat__tab:hover { background: fade(@accent, 50%); } .ceval .bar span { background: @green; &.threat { background: @red; } } .show-threat.active, .show-threat:hover:not(.hidden) { color: @red; } /* Openings */ .opening__config, .opening__next { background: @crust; } .opening__next { outline-color: @base; } .opening__next:hover { outline-color: @accent; } .opening__next__popularity span { background: @accent; } .opening__next__title { color: @accent; } /* Puzzles */ .tview2-column > index { background: @base; color: @subtext0 !important; } .puzzle__feedback { background: @base; } .puzzle__tools, .puzzle__side__metas, .puzzle__side__user, .puzzle__side__config, .puzzle__side__theme { background: @mantle; } input, textarea, select { background: @crust; } .cmn-toggle:checked + label { background-color: @green; } .cmn-toggle:checked + label::before { color: @green; } /* Teams */ .slist tbody tr:nth-child(even), .team-show__desc, .team-show__forum__post:nth-child(odd) { background: @crust; } /* Settings */ .account .radio input:checked + label, .account table.allows tr:nth-child(odd) td { background: @crust; } .radio label { background: @base; } .flash-warning { background: @peach; } .form-control:invalid { border-color: @red; } } }