-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Import KDE/Plasma Color Scheme Files #54
Comments
is there still interest on this? |
Yes |
and do you have any example files? |
also currently themix have more options, could you please write translation table for newer themix options? (wm window border color for example) |
or you can just put this file inside oomox repo dir and run it with specifying path to KDE theme as first argument: python3 ./kde_colors.py ./path/to/kde.colors from configparser import ConfigParser
from oomox_gui.plugin_api import OomoxImportPlugin
from oomox_gui.color import color_hex_from_list
class KDEColors(ConfigParser): # pylint: disable=too-many-ancestors
def __init__(self, colors_path):
super().__init__()
self.read(colors_path)
def get_color(self, section, key):
r, g, b = self.get(section, key).split(',')
return color_hex_from_list([r, g, b])
class Plugin(OomoxImportPlugin):
name = 'kde_colors'
display_name = 'Import KDE .colors file'
theme_translation = dict(
BG=('Colors:Window', 'BackgroundNormal', ),
)
def read_colorscheme_from_path(self, preset_path):
kde_colors = KDEColors(preset_path)
themix_theme = {}
for themix_key, kde_path in self.theme_translation.items():
themix_theme[themix_key] = kde_colors.get_color(*kde_path)
return themix_theme
if __name__ == '__main__':
import sys
print(Plugin().read_colorscheme_from_path(sys.argv[1])) |
and, if it works for you, could you please replace the code block theme_translation = dict(
BG=('Colors:Window', 'BackgroundNormal', ),
) to an actual theme mapping? |
I can write a full translation table if you provide a list or screenshot of the colors handled by themix. I cannot install themix via the AUR oomox-git package, because a dependency, resvg-git, fails to compile. |
{
"THEME_STYLE": "Theme Style",
"BG": "Background",
"FG": "Text",
"HDR_BG": "Header Background",
"HDR_FG": "Header Text",
"SEL_BG": "Selected Backround",
"SEL_FG": "Selected Text",
"ACCENT_BG": "Accent Color (Checkboxes, Radios)",
"TXT_BG": "Textbox Background",
"TXT_FG": "Textbox Text",
"BTN_BG": "Button Background",
"BTN_FG": "Button Text",
"HDR_BTN_BG": "Header Button Background",
"HDR_BTN_FG": "Header Button Text",
"WM_BORDER_FOCUS": "Focused Window Border",
"WM_BORDER_UNFOCUS": "Unfocused Window Border",
"MATERIA_VIEW": "View",
"MATERIA_SURFACE": "Surface (like Button, Menu, Popover)",
"ARC_WIDGET_BORDER_COLOR": "Border",
"CARET1_FG": "Textbox Caret",
"CARET2_FG": "BiDi Textbox Caret",
"ROUNDNESS": "Roundness",
"GRADIENT": "Gradient",
"CARET_SIZE": "Textbox Caret Aspect Ratio",
"SPACING": "Spacing",
"OUTLINE_WIDTH": "Focused Outline Width",
"BTN_OUTLINE_WIDTH": "Focused Button Outline Width",
"BTN_OUTLINE_OFFSET": "Focused Button Outline Offset",
"GTK3_GENERATE_DARK": "Add Dark Variant",
"CINNAMON_OPACITY": "Cinnamon: Opacity",
"MATERIA_SELECTION_OPACITY": "Selection Opacity",
"MATERIA_PANEL_OPACITY": "DE Panel Opacity",
"MATERIA_STYLE_COMPACT": "Compact Style",
"ARC_TRANSPARENCY": "Enable Theme Transparency",
"UNITY_DEFAULT_LAUNCHER_STYLE": "Unity: Use Default Launcher Style",
"ICONS_STYLE": "Icons Style",
"ICONS_LIGHT_FOLDER": "Light Base (Folders)",
"ICONS_MEDIUM": "Medium Base",
"ICONS_DARK": "Dark Stroke",
"ICONS_LIGHT": "Light Base",
"ICONS_ARCHDROID": "Icons Color",
"ICONS_SYMBOLIC_ACTION": "Actions Icons",
"ICONS_SYMBOLIC_PANEL": "Panel Icons",
"ICONS_NUMIX_STYLE": "Numix Style",
"TERMINAL_THEME_MODE": "Theme Options",
"TERMINAL_BASE_TEMPLATE": "Theme Style",
"TERMINAL_BACKGROUND": "Background",
"TERMINAL_FOREGROUND": "Foreground",
"TERMINAL_ACCENT_COLOR": "Accent Color",
"TERMINAL_THEME_AUTO_BGFG": "Auto-Swap BG/FG",
"TERMINAL_THEME_EXTEND_PALETTE": "Extend Palette with More Lighter/Darker Colors",
"TERMINAL_THEME_ACCURACY": "Palette Generation Accuracy",
"TERMINAL_COLOR0": "Black",
"TERMINAL_COLOR8": "Black Highlight",
"TERMINAL_COLOR1": "Red",
"TERMINAL_COLOR9": "Red Highlight",
"TERMINAL_COLOR2": "Green",
"TERMINAL_COLOR10": "Green Highlight",
"TERMINAL_COLOR3": "Yellow",
"TERMINAL_COLOR11": "Yellow Highlight",
"TERMINAL_COLOR4": "Blue",
"TERMINAL_COLOR12": "Blue Highlight",
"TERMINAL_COLOR5": "Purple",
"TERMINAL_COLOR13": "Purple Highlight",
"TERMINAL_COLOR6": "Cyan",
"TERMINAL_COLOR14": "Cyan Highlight",
"TERMINAL_COLOR7": "White",
"TERMINAL_COLOR15": "White Highlight",
"SPOTIFY_PROTO_BG": "Background",
"SPOTIFY_PROTO_FG": "Foreground",
"SPOTIFY_PROTO_SEL": "Accent Color"
}
|
I don't know what all the named values really correspond to (like why do materia and arc use different colors than every other theme?). I'll take a look at the program if and when there's a working PKGBUILD. |
man, what's wrong with you, read my message above carefully: PKGBUILD is fine, LLVM is broken in arch, so do rust, install rust directly |
Yeesh. Good luck with your project. |
you didn't cared to read properly my reply and started blaming me in incorrect pkgbuild and now also playing drama. problem not on my side |
arch linux pushed fixed version of their official rust package to stable repo today, so resvg can be built successfully without preconfiguring rustup manually:
|
Maybe you can get some help from KDE users that know better about KDE than me: @elenapan: I am not sure if she makes KDE themes, but she made, modified and readapted totally incredible themes which became a big success in the subreddit r/unixporn. You can see her works: https://github.com/elenapan/dotfiles. |
I converted gtk2 to qt5ct, Dolphin got ugly due to missed colours (all black) and also there are missed colours of window decoration (black), and the Plasma theme (menubar) did not get the 90s summer either. It is why better these KDE users indicated above help you to fix. |
i've added the initial version of the template, but it needs a lot of extra values to be added: https://github.com/themix-project/themix-plugin-base16/blob/master/templates_extra/kde/templates/default.mustache |
KDE / Plasma color schemes are INI-style files that list UI component colors as RGB values. For example a
.colors
file includes a section like this:My request is for Oomox to be able to import one of these
.colors
files, pick out the ~12 colors Oomox cares about, convert the values to hex format, and create a new preset with those values.Here is a reasonable mapping for those significant color slots:
Also useful is that the name of the scheme can be found at
[General][Name]
.The text was updated successfully, but these errors were encountered: