#image #light #dark #themes #discord #different #color

bin+lib discriminord

Create images that look different in Discord light and dark themes

3 releases (breaking)

0.3.0 Jan 27, 2021
0.2.0 Jan 24, 2021
0.1.0 Jan 22, 2021

#753 in Images

Download history 2/week @ 2024-02-15 7/week @ 2024-02-22 1/week @ 2024-02-29 27/week @ 2024-03-28 29/week @ 2024-04-04

56 downloads per month

0BSD license

11KB
170 lines

discriminord

Create images that appear differently in Discord light and dark themes, or any other application with two different background colors.

Webapp

Installation is no longer necessary! There is a webapp that provides a more interactive experience. If you would still like to use the CLI, follow the instructions below.

CLI Installation

  • You can download and compile it with Cargo: cargo install discriminord.

  • Prebuilt binaries are also available in the GitHub releases.

CLI Usage

  1. Pick two images, one to show to your dark mode friends, and one to show to your light mode enemies.

  2. Run discriminord <dark-image>.png <light-image>.png <output>.png.

  3. Share with your friends.

  4. Profit!

For more advanced usage, see discriminord --help.

How it works

The image uses transparency to change the brightness of pixels when the background color changes. The brightness and transparency of the image pixels can be thought of as parameters to a linear equation: y = ax + b. The background color is passed as the input x, and the output color (as seen by the viewer) is the output y. The alpha channel a describes how much the color will vary between the two backgrounds, and the brightness b is a baseline / offset.

Dependencies

~15MB
~105K SLoC