Skip to content

Instantly share code, notes, and snippets.

@kRHYME7
Last active October 6, 2024 06:21
Show Gist options
  • Save kRHYME7/b41de939393218f1abcb5f826150583e to your computer and use it in GitHub Desktop.
Save kRHYME7/b41de939393218f1abcb5f826150583e to your computer and use it in GitHub Desktop.

For this example, I am using swaync wallbash template. Note that this template is dynamic so by default it follows the wallpapers even in theme mode

With "theme.dcol" file.

image

Even if a theme, do not have "swaync.theme". We can tweak the colors by using "theme.dcol" This will give consistent elements, In this illustration swaync matches with waybar.

Without theme.dcol

image

This is the default scenario where there is no "theme.dcol" All templates that are not declared by *.theme will follow the wallpaper. For example, swaync looks different with waybar and the kitty terminal.

Either way both aims to have an aesthetic impact, so theme maintainers should use this wisely.

theme.dcol files

Theme and Dominant Colors

If the theme directory has a theme.dcol file, it will override the cached wall.dcol (the dominant colors based on the current wallpaper). This allows theme maintainers to implement strict color combinations for their themes.

Theme Maintainers

For theme maintainers, the theme.dcol file can be used to enforce specific color combinations, ensuring that the theme remains consistent across different elements. This is especially important as static themes are typically limited to files like:

  • waybar.theme
  • kconfig.theme
  • rofi.theme

These files rely on templates that often use the wallpaper's dominant colors (dcol). By using the theme.dcol file, maintainers can override the wallpaper's dcol to ensure that consistent colors are applied to bars, widgets, and other elements.

Benefits and Drawbacks

Having a theme.dcol file provides a consistent look, which can be particularly useful for maintaining uniform color schemes across bars, rofi, etc. However, this approach can be a double-edged sword:

  • Consistency: The bars and widgets will have consistent colors, regardless of the wallpaper.
  • Uniqueness: Some wallpapers may offer unique combinations that make the bars or widgets stand out. In this case, overriding the wallpaper's dcol might detract from the overall aesthetic.

The key is finding a balance between consistency and the uniqueness that wallpapers can offer.

Below is a sample theme.dcol file. You will notice that it is structured like the one in ~/.cache/hyde/wall.dcol Instead of sourcing the wall.dcol (wallpaper dominant colors ) we will source theme.dcol if it exist

# Use the theme.dcol file to define the dominant colors for the theme
# instead of using dominant colors from wallpapers.

dcol_mode="dark"
dcol_pry1="002B36"
dcol_pry1_rgba="rgba(0,43,54,1)"
dcol_txt1="FDF6E3"
dcol_txt1_rgba="rgba(253,246,227,1)"
dcol_1xa1="073642"
dcol_1xa1_rgba="rgba(7,54,66,1)"
dcol_1xa2="586E75"
dcol_1xa2_rgba="rgba(88,110,117,1)"
dcol_1xa3="657B83"
dcol_1xa3_rgba="rgba(101,123,131,1)"
dcol_1xa4="839496"
dcol_1xa4_rgba="rgba(131,148,150,1)"
dcol_1xa5="93A1A1"
dcol_1xa5_rgba="rgba(147,161,161,1)"
dcol_1xa6="EEE8D5"
dcol_1xa6_rgba="rgba(238,232,213,1)"
dcol_1xa7="B58900"
dcol_1xa7_rgba="rgba(181,137,0,1)"
dcol_1xa8="CB4B16"
dcol_1xa8_rgba="rgba(203,75,22,1)"
dcol_1xa9="DC322F"
dcol_1xa9_rgba="rgba(220,50,47,1)"
dcol_pry2="073642"
dcol_pry2_rgba="rgba(7,54,66,1)"
dcol_txt2="FDF6E3"
dcol_txt2_rgba="rgba(253,246,227,1)"
dcol_2xa1="586E75"
dcol_2xa1_rgba="rgba(88,110,117,1)"
dcol_2xa2="657B83"
dcol_2xa2_rgba="rgba(101,123,131,1)"
dcol_2xa3="839496"
dcol_2xa3_rgba="rgba(131,148,150,1)"
dcol_2xa4="93A1A1"
dcol_2xa4_rgba="rgba(147,161,161,1)"
dcol_2xa5="EEE8D5"
dcol_2xa5_rgba="rgba(238,232,213,1)"
dcol_2xa6="B58900"
dcol_2xa6_rgba="rgba(181,137,0,1)"
dcol_2xa7="CB4B16"
dcol_2xa7_rgba="rgba(203,75,22,1)"
dcol_2xa8="DC322F"
dcol_2xa8_rgba="rgba(220,50,47,1)"
dcol_2xa9="D33682"
dcol_2xa9_rgba="rgba(211,54,130,1)"
dcol_pry3="073642"
dcol_pry3_rgba="rgba(7,54,66,1)"
dcol_txt3="FDF6E3"
dcol_txt3_rgba="rgba(253,246,227,1)"
dcol_3xa1="586E75"
dcol_3xa1_rgba="rgba(88,110,117,1)"
dcol_3xa2="657B83"
dcol_3xa2_rgba="rgba(101,123,131,1)"
dcol_3xa3="839496"
dcol_3xa3_rgba="rgba(131,148,150,1)"
dcol_3xa4="93A1A1"
dcol_3xa4_rgba="rgba(147,161,161,1)"
dcol_3xa5="EEE8D5"
dcol_3xa5_rgba="rgba(238,232,213,1)"
dcol_3xa6="B58900"
dcol_3xa6_rgba="rgba(181,137,0,1)"
dcol_3xa7="CB4B16"
dcol_3xa7_rgba="rgba(203,75,22,1)"
dcol_3xa8="DC322F"
dcol_3xa8_rgba="rgba(220,50,47,1)"
dcol_3xa9="D33682"
dcol_3xa9_rgba="rgba(211,54,130,1)"
dcol_pry4="073642"
dcol_pry4_rgba="rgba(7,54,66,1)"
dcol_txt4="FDF6E3"
dcol_txt4_rgba="rgba(253,246,227,1)"
dcol_4xa1="586E75"
dcol_4xa1_rgba="rgba(88,110,117,1)"
dcol_4xa2="657B83"
dcol_4xa2_rgba="rgba(101,123,131,1)"
dcol_4xa3="839496"
dcol_4xa3_rgba="rgba(131,148,150,1)"
dcol_4xa4="93A1A1"
dcol_4xa4_rgba="rgba(147,161,161,1)"
dcol_4xa5="EEE8D5"
dcol_4xa5_rgba="rgba(238,232,213,1)"
dcol_4xa6="B58900"
dcol_4xa6_rgba="rgba(181,137,0,1)"
dcol_4xa7="CB4B16"
dcol_4xa7_rgba="rgba(203,75,22,1)"
dcol_4xa8="DC322F"
dcol_4xa8_rgba="rgba(220,50,47,1)"
dcol_4xa9="D33682"
dcol_4xa9_rgba="rgba(211,54,130,1)"

HyDE - Dcol and Wallbash

Overview

This document provides an explanation of the color configuration used for theming HyDE. It covers primary colors, text colors, and accent colors. Each color can be specified in either hexadecimal or RGBA format.

Color Identifiers

By default, while caching, it will produce 4 primary colors, 4 text colors, and 9 accent colors for each primary color.

  • dcol_mode: This identifier determines whether the theme is in dark or light mode.
  • dcol_pryX: These are the primary colors, with X ranging from 1 to 4.
  • dcol_txtX: These are the inverted primary colors used for text, with X ranging from 1 to 4.
  • dcol_XaxY: These are the accent colors for each primary color, with X ranging from 1 to 4 and Y ranging from 1 to 9.
  • _rgba: This suffix indicates that the color is in RGBA format. If the suffix is not present, the color is in hexadecimal format.

Usage

To use the color configuration, follow these guidelines:

  • Replace the prefix dcol_ with wallbash_ to allow the Wallbash script to parse and change the values.
  • Consider the wallbash_ prefix as a placeholder for the dominant color value.
  • Wrap the color identifier with angle brackets (<...>) to indicate that it should be replaced with the corresponding value.
    • For example, <wallbash_pry1>.
  • You can use this example as a template for configuring the colors.

By using this approach, you can create a template for configurations. Instead of hardcoding the colors, you can use the dominant color or wallpaper and let the Wallbash script convert it for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment