/* ==UserStyle== @name Chess.com Catppuccin @namespace github.com/catppuccin/userstyles/styles/chess.com @homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/chess.com @version 2025.03.24 @updateURL https://github.com/keonly/userstyles/raw/main/styles/chess.com/catppuccin.user.less @supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Achess.com @description Soothing pastel theme for Chess.com @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 highlightColor1 "Highlight 1" ["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 highlightColor2 "Highlight 2" ["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 highlightColor3 "Highlight 3" ["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 highlightColor4 "Highlight 4" ["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 styleBoardAndPieces "Style Board & Pieces" 1 ==/UserStyle== */ @-moz-document domain("chess.com") { :root { #catppuccin(@lightFlavor); } :root.dark-mode { #catppuccin(@darkFlavor); } #catppuccin(@flavor) { @rosewater: @catppuccin[@@flavor][@rosewater]; @flamingo: @catppuccin[@@flavor][@flamingo]; @pink: @catppuccin[@@flavor][@pink]; @mauve: @catppuccin[@@flavor][@mauve]; @red: @catppuccin[@@flavor][@red]; @maroon: @catppuccin[@@flavor][@maroon]; @peach: @catppuccin[@@flavor][@peach]; @yellow: @catppuccin[@@flavor][@yellow]; @green: @catppuccin[@@flavor][@green]; @teal: @catppuccin[@@flavor][@teal]; @sky: @catppuccin[@@flavor][@sky]; @sapphire: @catppuccin[@@flavor][@sapphire]; @blue: @catppuccin[@@flavor][@blue]; @lavender: @catppuccin[@@flavor][@lavender]; @text: @catppuccin[@@flavor][@text]; @subtext1: @catppuccin[@@flavor][@subtext1]; @subtext0: @catppuccin[@@flavor][@subtext0]; @overlay2: @catppuccin[@@flavor][@overlay2]; @overlay1: @catppuccin[@@flavor][@overlay1]; @overlay0: @catppuccin[@@flavor][@overlay0]; @surface2: @catppuccin[@@flavor][@surface2]; @surface1: @catppuccin[@@flavor][@surface1]; @surface0: @catppuccin[@@flavor][@surface0]; @base: @catppuccin[@@flavor][@base]; @mantle: @catppuccin[@@flavor][@mantle]; @crust: @catppuccin[@@flavor][@crust]; @accent: @catppuccin[@@flavor][@@accentColor]; @highlight1: @catppuccin[@@flavor][@@highlightColor1]; @highlight2: @catppuccin[@@flavor][@@highlightColor2]; @highlight3: @catppuccin[@@flavor][@@highlightColor3]; @highlight4: @catppuccin[@@flavor][@@highlightColor4]; color-scheme: if(@flavor = latte, light, dark); ::selection { background-color: fade(@accent, 30%); } input, textarea { &::placeholder { color: @subtext0 !important; } } --color-bg-opaque: @mantle; --color-bg-opaque-lighter: @base; --color-bg-subtle: @surface1; --color-bg-subtler: @surface0; --color-bg-input: @mantle; --color-bg-speech: @surface0; --color-bg-secondary: @surface0; --color-bg-tertiary: @surface1; --color-bg-quaternary: @surface2; --color-gray-100: @overlay1; --color-text-speech: @text; --color-icon-default: @subtext0; --color-icon-default-hovered: @subtext1; --color-icon-bolder: @subtext1; --color-icon-boldest: @text; --color-text-boldest: @text; --color-text-bolder: @text; --color-text-default: @text; --color-text-default-hovered: @subtext1; --color-text-subtle: @subtext1; --color-text-placeholder: @subtext0; --color-text-inverse: @crust; --color-text-link: @blue; --color-text-link-hovered: @sky; --color-border-default: @surface1; --color-border-subtle: @overlay2; --color-border-selected: @accent; --color-green-300: @accent; --color-red-300: @red; /* Danger */ --color-red-400: @red; /* Danger */ --color-green-400: @green; /* Success */ /* Links */ --color-blue-200: @sapphire; --color-blue-300: @sky; --color-blue-400: @blue; --color-classification-blunder: @red; --color-classification-miss: @maroon; --color-classification-mistake: @peach; --color-classification-inaccuracy: @yellow; --color-classification-best: @green; --color-classification-excellent: @green; --color-classification-good: @teal; --color-classification-great: @blue; --color-classification-brilliant: @sapphire; --color-classification-book: @rosewater; --color-icon-win: @green; --color-text-win: @green; --color-icon-draw: @subtext0; --color-text-draw: @subtext0; --color-bg-draw: @subtext0; --color-border-draw: var(--color-transparent-white-10); --color-icon-loss: @red; --color-text-loss: @red; --color-border-loss: @red; --color-icon-bullet: @peach; --color-icon-blitz: @yellow; body { --theme-background-color: @base !important; --theme-background-image: none; --globalBackground: @mantle !important; --globalBackgroundOpaque: @mantle !important; --globalSecondaryBackground: @crust !important; --globalTertiaryBackground: @surface0 !important; --globalAccentBackground: @accent !important; --globalSecondaryAccentBackground: @surface0 !important; --globalSiteBackground: @base !important; --globalBorder: @surface0 !important; --globalColorThemeFull: @text !important; --globalColorThemeHigh: @text; --globalColorThemeMid: @overlay2 !important; --globalColorThemeLow: @overlay0 !important; --globalColorThemeLower: @base !important; --globalColorThemeLink: @sapphire !important; --globalColorThemeBlueToMid: @text; --globalOverlayBackground: @base !important; --globalColorWin: @green !important; --globalColorDraw: @accent !important; --globalColorLoss: @red !important; --labelBgColor: @surface1; --activeLabelColor: @accent; --buttonBgColor: @text; --nodeColor: @text; --nodeBackground: @yellow; } /* Home page */ .index-title, .index-info-item-counter { color: @text !important; } .index-info-item { color: @subtext0 !important; } .index-suggestion-title, .index-posts-title, .index-post-name { color: @text; } .index-quote-author, .index-quote-body, .index-post-author { color: @subtext1; } .promo-title, .promo-rank { color: @text; } .promo-subtitle { color: @subtext1; } .home-username-link { color: @text; } /* Lessons page */ .level-title { color: @text; } .level-desc, .course-header-description strong { color: @subtext1; } .lessons-search-filter { .form-dropdown-chevron, .form-dropdown-control-label, .form-dropdown-value { color: @subtext1; } } /* Play lesson video */ .lesson-status { background-color: @text; } /* More page */ .landing-header { color: @text; } /* UI */ .v5-title-label { color: @text; } .v5-tabs-list, .v5-tabs-list-dark { --borderColor: @surface2; --tabTitleColor: @subtext0; --tabHoverTitleColor: @subtext1; --tabSelectedBorderColor: @subtext1; --tabSelectedTitleColor: @text; } .ui_v5-input-component { --borderColor: @surface0; --borderFocus: @surface1; --bgColor: @base; --textColor: @text; --secondaryTextColor: @subtext1; } .ui_v5-input-group-component { --inputIconColor: @subtext0; } .ui_v5-button-component { --boxShadow: none; --boxShadowHover: none; box-shadow: none; &.ui_v5-button-basic { --basicColor: @text !important; --basicHoverColor: @text !important; --basicBgColor: @surface1 !important; --basicBghover: @surface2 !important; --borderColor: @surface0 !important; } &.ui_v5-button-primary { color: @crust !important; background-color: @accent; &:hover { background-color: darken(@accent, 5%); box-shadow: none; } } } .ui_v5-select-component { --borderColor: @surface0; --borderFocus: @surface1; --bgColor: @base; --textColor: @text; --arrowColor: @subtext0; } .ui_pagination-item-component { --paginationColor: @text; --paginationBgColor: @surface1; --paginationBgHover: @surface2; --paginationColorMuted: @base; --paginationBgColorMuted: @overlay1; } .nav-link-text { color: @text !important; } .nav-menu-area:last-of-type .icon-font-chess { color: @mantle !important; } .nav-link-main-design, .nav-link-main-link { color: @text !important; &:hover { color: @subtext1 !important; } } #tb { .toolbar-action-icon { color: @subtext1; } .toolbar-action-wrapper:hover .toolbar-action-icon { color: @text !important; } } #sb { color: @subtext0; &.open { background-color: @mantle; } .nav-action:hover { background-color: @surface0; color: @text; } .nav-panel-shade, .nav-panel-theme-bg, .nav-action.has-popover + .nav-popover { background: @mantle !important; } .nav-popover.dark .btn-link { color: @text; } .nav-menu-area:last-of-type { color: @text !important; } .nav-popover.nav-search { --search-bg-color: @surface0; } } .nav-popover.dark { background: @mantle; } .section-heading-component .back-link-component { color: currentcolor; } .section-heading-black { background-color: @surface1; color: @text; } .nav-section-header-component { background-color: @base; color: @text; } .popover-friends-header, .popover-friends-content, .popover-messages-header, .popover-messages-content, .popover-settings-header, .popover-settings-content { background: @mantle; } /* Buttons */ .selector-button-button, .time-selector-button-button { background: @surface0; &:hover { background: @surface1; } } .cc-switch-checkbox:not(.cc-switch-readonly):checked + .cc-switch-label .cc-switch-button { background-color: @surface1; } .cc-button-component, .cc-button-primary { --bgColor: @accent; --bgColorHover: darken(@accent, 5%); --textColor: @crust; --textColorHover: @crust; box-shadow: none; } .cc-button-primary, .cc-button-monetization { --borderBottomLine: darken(@accent, 2%); --borderBottomLineHover: darken(@accent, 4%); } .cc-button-secondary { --bgColor: @surface0; --bgColorHover: darken(@surface0, 5%); --iconColor: @text; --iconColorHover: @text; --textColor: @text; --textColorHover: @text; } .cc-button-danger { --bgColor: @red; --bgColorHover: darken(@red, 5%); color: @crust; } .v5-section-shadow, .v5-section-shadow-hover { --linkHoverBackground: @surface1; --linkBoxShadow: 0 0.5rem 0 0 @surface2; } /* Game */ .user-username-component, .cc-user-username-white, .cc-user-rating-white { color: @text; text-shadow: none; } .user-tagline-rating.user-tagline-white { color: @overlay1; } .clock-component.clock-black { background: @surface0; } .clock-component.clock-white { background: @text; } .highlight { &[style*="rgb(235, 97, 80)"] { background: fade(@highlight1, 80%) !important; } &[style*="rgb(172, 206, 89)"] { background: fade(@highlight2, 80%) !important; } &[style*="rgb(255, 170, 0)"] { background: fade(@highlight3, 80%) !important; } &[style*="rgb(82, 176, 220)"] { background: fade(@highlight4, 80%) !important; } opacity: 1 !important; } .hover-square rect { stroke: @overlay1 !important; } .hint { background-color: @overlay1; filter: drop-shadow(0 0 1px @crust); } .capture-hint { background-color: @overlay1; filter: drop-shadow(0 0 1px @crust); z-index: -1; } /* Review/evaluation */ .evaluation-bar-bar { .evaluation-bar-black { background-color: @surface2; } .evaluation-bar-draw { background-color: @overlay1; } .evaluation-bar-white { background-color: @text; } } .review-rating-white { background-color: @text; } .review-rating-black { background-color: @surface0; color: @text; } .overview-view-new-game-button { background-color: @surface1; } .arrow { &[style*="rgba(248, 85, 63, 0.8)"] { fill: @highlight1 !important; } &[style*="rgba(159, 207, 63, 0.8)"] { fill: @highlight2 !important; } &[style*="rgba(255, 170, 0, 0.8)"] { fill: @highlight3 !important; } &[style*="rgba(72, 193, 249, 0.8)"] { fill: @highlight4 !important; } } g#winner [fill="#dbac16"] { fill: @yellow !important; } /* Game over */ .modal-game-over-header-grey, .modal-game-over-header-black-win, .game-over-header-component { background-color: @base; color: @text; } .modal-game-over-user-winner-active, .modal-game-over-user-crown { background: @lavender; } .game-over-review-button-label { color: @crust; text-shadow: none; } /* Ads */ .placeholder-ad-upgrade { background-color: @accent; } .placeholder-ad-link { color: @crust; } .modal-trial-component.modal-trial-special-offer { .modal-trial-header-background { background-color: @accent; } } .coach-nudges-modal-component { background: @mantle; } .ready-to-play-banner-component { background-color: @mantle; .ready-to-play-banner-title, .ready-to-play-banner-list { color: @text; } } .notifications-links-trial .nav-link-text { color: @crust !important; } /* Misc */ /* GM/IM/etc badge */ --color-bg-chesstitle: @accent; .course-author-title, .course-header-author-title, .form-dropdown-short-title, .index-chess-title, .leaderboard-index-chess-title, .player-header-title, .category-headline-chess-title { color: @crust !important; } .tooltip-body { background: @surface0; color: @text; &::after { border-top-color: @surface0 !important; } } .popup-component { background-color: @surface0; color: @text; &.popup-left .popup-arrow { border-left-color: @surface0; } &.popup-right .popup-arrow { border-right-color: @surface0; } } /* Error banner */ .alerts-alert { color: @crust; } div.mode-selection-button-selected { > .mode-selection-button-description { color: @surface1; } > .mode-selection-button-mode { color: @mantle; } } .status-component { background-color: @accent; color: @crust; } .navigation-footer-page-component, .navigation-footer-platform-icon { color: @subtext1; text-shadow: none; } .download-button-button { color: @crust !important; } .table-hover tbody tr:hover { background-color: @surface2; } /* Board */ @light-cell: if(@flavor = latte, @surface0, @accent); @dark-cell: if(@flavor = latte, @accent, @surface0); @board: escape( '' ); & when (@styleBoardAndPieces = 1) { #board-play-computer, .fade-in-overlay { background-image: url("data:image/svg+xml,@{board}"); } .coordinate-light { fill: @dark-cell; } .coordinate-dark { fill: @light-cell; } } /* The "Tatiana" piece set. Author: sadsnake1 License: CC BY-NC-SA 4.0 (https://creativecommons.org/licenses/by-nc-sa/4.0/) Source: https://github.com/sharechess/sharechess/tree/4f2f54c1340df59556f0f1d67e7b788c3322229c/public/pieces/tatiana */ @white-piece-bg: if(@flavor = latte, @surface2, @text); @black-piece-bg: if(@flavor = latte, @text, @surface2); @bishop: ''; @king: ''; @knight: ''; @rook: ''; @pawn: ''; @queen: ''; #piece(@piece, @type) { @raw: if( @type = "white", replace( replace( replace( replace(@piece, "%BORDER%", @mantle), "%BG%", @white-piece-bg ), "#fff", @mantle ), "#000", @text ), replace( replace( replace( replace(@piece, "%BORDER%", @mantle), "%BG%", @black-piece-bg ), "#fff", @text ), "#000", @mantle ) ); @svg: escape(@raw); @result: url("data:image/svg+xml,@{svg}"); } .board-popover-component { background-color: @surface0; } & when (@styleBoardAndPieces = 1) { --theme-board-style-image: url("data:image/svg+xml,@{board}"); --theme-board-style-highlight-color: @highlight1; --theme-piece-set-wp: #piece(@pawn, "white")[]; --theme-piece-set-wn: #piece(@knight, "white")[]; --theme-piece-set-wr: #piece(@rook, "white")[]; --theme-piece-set-wb: #piece(@bishop, "white")[]; --theme-piece-set-wq: #piece(@queen, "white")[]; --theme-piece-set-wk: #piece(@king, "white")[]; --theme-piece-set-bp: #piece(@pawn, "black")[]; --theme-piece-set-bn: #piece(@knight, "black")[]; --theme-piece-set-bb: #piece(@bishop, "black")[]; --theme-piece-set-br: #piece(@rook, "black")[]; --theme-piece-set-bq: #piece(@queen, "black")[]; --theme-piece-set-bk: #piece(@king, "black")[]; .piece { /* Black */ &.bp { background-image: #piece(@pawn, "black")[] !important; } &.bn { background-image: #piece(@knight, "black")[] !important; } &.bb { background-image: #piece(@bishop, "black")[] !important; } &.br { background-image: #piece(@rook, "black")[] !important; } &.bk { background-image: #piece(@king, "black")[] !important; } &.bq { background-image: #piece(@queen, "black")[] !important; } /* White */ &.wp { background-image: #piece(@pawn, "white")[] !important; } &.wn { background-image: #piece(@knight, "white")[] !important; } &.wb { background-image: #piece(@bishop, "white")[] !important; } &.wr { background-image: #piece(@rook, "white")[] !important; } &.wk { background-image: #piece(@king, "white")[] !important; } &.wq { background-image: #piece(@queen, "white")[] !important; } } } .chessboard-pkg-move-list-component .dark-row { background-color: @surface1; } } } /* deno-fmt-ignore */ @catppuccin: { @latte: { @rosewater: #dc8a78; @flamingo: #dd7878; @pink: #ea76cb; @mauve: #8839ef; @red: #d20f39; @maroon: #e64553; @peach: #fe640b; @yellow: #df8e1d; @green: #40a02b; @teal: #179299; @sky: #04a5e5; @sapphire: #209fb5; @blue: #1e66f5; @lavender: #7287fd; @text: #4c4f69; @subtext1: #5c5f77; @subtext0: #6c6f85; @overlay2: #7c7f93; @overlay1: #8c8fa1; @overlay0: #9ca0b0; @surface2: #acb0be; @surface1: #bcc0cc; @surface0: #ccd0da; @base: #eff1f5; @mantle: #e6e9ef; @crust: #dce0e8; }; @frappe: { @rosewater: #f2d5cf; @flamingo: #eebebe; @pink: #f4b8e4; @mauve: #ca9ee6; @red: #e78284; @maroon: #ea999c; @peach: #ef9f76; @yellow: #e5c890; @green: #a6d189; @teal: #81c8be; @sky: #99d1db; @sapphire: #85c1dc; @blue: #8caaee; @lavender: #babbf1; @text: #c6d0f5; @subtext1: #b5bfe2; @subtext0: #a5adce; @overlay2: #949cbb; @overlay1: #838ba7; @overlay0: #737994; @surface2: #626880; @surface1: #51576d; @surface0: #414559; @base: #303446; @mantle: #292c3c; @crust: #232634; }; @macchiato: { @rosewater: #f4dbd6; @flamingo: #f0c6c6; @pink: #f5bde6; @mauve: #c6a0f6; @red: #ed8796; @maroon: #ee99a0; @peach: #f5a97f; @yellow: #eed49f; @green: #a6da95; @teal: #8bd5ca; @sky: #91d7e3; @sapphire: #7dc4e4; @blue: #8aadf4; @lavender: #b7bdf8; @text: #cad3f5; @subtext1: #b8c0e0; @subtext0: #a5adcb; @overlay2: #939ab7; @overlay1: #8087a2; @overlay0: #6e738d; @surface2: #5b6078; @surface1: #494d64; @surface0: #363a4f; @base: #24273a; @mantle: #1e2030; @crust: #181926; }; @mocha: { @rosewater: #f5e0dc; @flamingo: #f2cdcd; @pink: #f5c2e7; @mauve: #cba6f7; @red: #f38ba8; @maroon: #eba0ac; @peach: #fab387; @yellow: #f9e2af; @green: #a6e3a1; @teal: #94e2d5; @sky: #89dceb; @sapphire: #74c7ec; @blue: #89b4fa; @lavender: #b4befe; @text: #f4f4f4; @subtext1: #e0e0e0; @subtext0: #c6c6c6; @overlay2: #a8a8a8; @overlay1: #8d8d8d; @overlay0: #6f6f6f; @surface2: #525252; @surface1: #393939; @surface0: #262626; @base: #161616; @mantle: #0b0b0b; @crust: #000000; }; };