Unified Dyes
The purpose of this mod originally was to supply a complete set of colors for Minetest mod authors to use for colorized nodes, or to reference in. recipes. Since the advent of the default dyes mod in minetest_game, this mod has become more of an extension of the default mod and a library for general color handling.Unified Dyes expands the standard dye set from 15 colors to 32, 197, or 256 (see below).
Dependencies: Minetest engine version 5.1.0 or higher and a corresponding copy of minetest_game.
Recommends: default flowers mod.
License: GPL 2.0 or higher.
Download: https://github.com/mt-mods/unifieddyes/ ... master.zip
...or browse the code: https://github.com/mt-mods/unifieddyes
Install: Unzip the distribution file, rename the resultant folder to just "unifieddyes", move it into Minetest's mods folder, and enable it in your world configuration.
API:
The full Unified Dyes API is documented here: https://github.com/mt-mods/unifieddyes/ ... ter/API.md
Used By:
Spoiler
Spoiler
This is the official "extended" palette, showing 240 colors, arranged as 24 hues with 10 brightness/saturation combinations for each, plus 16 greys. For an example of how this palette is used, see Stained Glass mod. If you happen to examine the palette file, you'll notice several bright green pixels in one corner, so-colored to remind me (or you) that these are unused pixels that will be discarded by the engine. If you notice a warning about this palette not having exactly 256 pixels, ignore it.
This is the 197-color palette, which is actually supplied as a set of "cut up" palette images: each of the 24 hues above has its own file, with each file containing 8 shades of that hue, plus one more containing the 5 levels of greyscale. These palettes are used when you need the "colorfacedir" mode, especially when you need to define a whole bunch of alternate shapes from your base node. You define a single base node, as usual, then 25 copies of each of your alternate shapes, one suitably-named copy per hue (there's a helper function for this, by the way). Take a look at my Colored Wood mod for examples of how this is done (you can also see examples of the "extended" palette in that mod).
This is the "colorwallmounted" palette, which contains an abridged version of the above palette, since the engine only allows 32 color slots with that mode. This palette contains eight of the standard hues, three shades each (full, medium, dark), plus the standard 5-shades of greyscale, along with light blue, light green, and pink. Take a look at my Industrial Lights mod for an example of how this palette is used.
Spoiler
The short version:
- Get some flowers, cactus, or coal.
- Make some dye, maybe mix some of those dyes together to get more colors.
- Place a neutral-colored block on the ground.
- Use the airbrush on the block to change its color.
- Or, just craft and place the colored block directly.
First thing's first: you're going to need to harvest some materials to make the dyes from. For this, you need one or more of the following: roses (red), tulips (orange), yellow dandelions (yellow), cactus (green), geraniums (blue), violas (purple), coal (black), or white dandelions (white). Simply wander around your world and collect whichever of the above you need to get your colors.
Simply place one of the above materials into the crafting grid to obtain four portions of dye in that color. From those 8 "base" colors, you can directly fashion the rest. In some cases, you can also craft one or more interim colors and then use those to craft the main colors, as outlined below (for example, you can make azure with two blue and one green, or one cyan and one blue).
Here you can see the 24 standard hues and 16 levels of greyscale. All of the colors were created by directly crafting the 6 "base" hues, while black and white were used to create some greys, then those were combined together or with more black and/or white to create the rest of the greys. These crafting recipes are all "shapeless" (i.e. it doesn't matter how you arrange the dyes), and all of them yield 2 unless otherwise stated. They are as follows:
██ (0°) Red: 1 rose flower (not the dye color, yields 4)
██ (15°) Vermilion: red + orange
██ (30°) Orange: 1 tulip, or mix red + yellow dye
██ (45°) Amber: orange + yellow
██ (60°) Yellow: 1 yellow dandelion (yields 4)
██ (75°) Lime: yellow + chartreuse, or 2 yellow + 1 green (yields 3)
██ (90°) Chartreuse: yellow + green
██ (105°) Harlequin: chartreuse + green, or 1 yellow + 2 green (yields 3)
██ (120°) Green: 1 cactus (yields 4), or mix yellow + blue
██ (135°) Malachite: green + spring, or 2 green + 1 cyan (yields 3), or 3 green + 1 cyan (yields 4)
██ (150°) Spring: green + cyan, or 2 green + 1 blue (yields 3)
██ (165°) Turquoise: spring + cyan, or 1 green + 2 cyan (yields 3), or 3 green + 2 blue (yields 5)
██ (180°) Cyan: green + blue
██ (195°) Cerulean: cyan + azure, or 2 cyan + 1 blue (yields 3), or 2 green + 3 blue (yields 5)
██ (210°) Azure: cyan + blue, or 1 green + 2 blue (yields 3)
██ (235°) Sapphire: azure + blue, or 1 cyan + 2 blue (yields 3)
██ (240°) Blue: 1 geranium
██ (255°) Indigo: 1 blue + violet
██ (270°) Violet: 1 viola (yields 4), or mix blue + magenta
██ (285°) Mulberry: violet + magenta, or violet + blue + red (yields 3)
██ (300°) Magenta: blue + red
██ (315°) Fuchsia: magenta + rose, or blue + red + rose dye (yields 3), or red + violet
██ (330°) Rose dye: magenta + red, or 2 red + 1 blue (yields 3)
██ (345°) Crimson: rose dye + red, or 1 magenta + 2 red (yields 3), or 1 blue + 3 red (yields 4)
██ (0%) Black: 1 piece of coal (yields 4)
██ (6.7%) Grey #1: 3 black + 1 dark grey (yields 4)
██ (13.3%) Grey #2: 2 black + 1 dark grey (yields 3)
██ (20%) Grey #3: black + dark grey
██ (26.7%) Grey #4 ("Dark Grey"): 1 white + 2 black (yields 3)
██ (33.3%) Grey #5: 2 dark grey + 1 grey (yields 3)
██ (40%) Grey #6: dark grey + grey
██ (46.7%) Grey #7: 1 dark grey + 2 grey (yields 3)
██ (53.3%) Grey #8 (just "Grey"): white + black
██ (60%) Grey #9: 2 grey + 1 light grey (yields 3)
██ (66.7%) Grey #10: 1 grey + 2 light grey (yields 3)
██ (73.3%) Grey #11 ("Light Grey"): 2 white + 1 black (yields 3)
██ (80%) Grey #12: 2 light grey + 1 white (yields 3)
██ (86.7%) Grey #13: light grey + white
██ (93.3%) Grey #14: 1 light grey + 2 white (yields 3)
▏▕ (100%) White: 1 white dandelion (yields 4)
The list above has one exception: If you have Technic mod installed, it overrides the cactus recipe, making it yield 1 dye. You must use its "extractor" device to get 4.
The degree figures are the colors' hues on a standard HSV color wheel, and are what I used in the textures supplied with this mod. For the greys, the figures in parenthesis indicate the ideal brightness of the shade, relative to white, but note that they're not exactly on target, depending on which palette you're using. In the 32- and 197-color split palettes, black doesn't go all the way to the bottom of the scale, since there just aren't many greyscale levels to work with there, and pure black would crush out all of the details in your textures. The 256-color palette has a pure black shade, but you probably won't want to use it that much.
Darker/Lighter colors, low-saturation variations
To obtain lighter or darker shades, simply mix one or two portions of the hue from the list above with black or white as outlined below.
Faint: base color + 3 white (yields 4)
Pastel: base color + 2 white (yields 3)
Light: base color + 1 white
Bright: two base color + 1 white (yields 3)
Medium: base color + 1 black
Dark: base color + 2 black (yields 3)
The above formula has one exception: because of a conflict with default dyes mod, dark orange must be crafted from two brown dyes (yields 2, of course).
Low saturation: base color + light grey, or base color + one black + two white (yields 4)
Low saturation, Medium: base color + grey, or base color + one black + one white (yields 3)
Low saturation, Dark: base color + dark grey, or base color + two black + one white (yields 4)
Applying dye to a node
Now that you have some color, simply use it in a crafting recipe, just like normal (assuming the mod the recipe's for supports that color).
The airbrush
If crafting is not to your taste, there's also the airbrush tool. To make one:
Two steel ingots, one brass ingot, one plastic sheet.
To use it, simply right-click on any random node (colorized or not, colorable or not) to open the color selector:
The color selector, showing highlights around the 15 standard minetest_game dyes that I have in my inventory.
Click on a color to select it, then click "Accept" to commit to that color. Then, just run around, punching nodes with the airbrush to paint or re-paint them (assuming a given node can take on a color, of course).
In survival mode, whatever dye you want to paint with must be somewhere (anywhere) in your inventory, except the crafting grid. Your on-hand dyes will be highlighted in the selector, as shown above, and the selector will limit your choices to just those so-highlighted. The selected dye will be consumed as you use the airbrush to repaint nodes.
In creative mode, no on-hand dyes are necessary. Any color may be selected (the "on hand" markers are not shown). Obviously, there's nothing to run out of in this mode. :-)
The airbrush will warn you if you try to paint unpaintable nodes, if you're out of the dye you wanted to use (in survival mode), if you try to paint a node with a color it can't take, and several other messages.
You can also shift + right-click on a colorized node while wielding the airbrush, and it will attempt to figure out what the name of the color is that's applied to that node, and will switch to that color.
And no, you don't get the old dye back when you change the color of a node. :-P
Misc. Notes
If you need to use /give commands, the item names are simply "dye:color", e.g. "dye:red", "dye:pink", or "dye:yellow". Greys have a similar naming convention: dye:white, dye:light_grey, dye:grey, dye:dark_grey, or dye:black, or "dye:grey_" followed by a number from 1 to 14 (1 being the darkest shade, aside from black).
For everything beyond the initial "full" hues, the item names are of the following format:
dye:[brightness]_[hue]_[saturation]
Where "brightness" can be "faint", "pastel", "light", "bright", nothing at all (e.g. full), medium, or dark. "Hue" is exactly as in the tables and images above, e.g. red, green, yellow, etc. "Saturation" can be either nothing or "s50". Omit trailing and leading underscores.
For example, low saturation dark yellow is "unifieddyes:dark_yellow_s50", while light normal-saturation violet would be "unifieddyes:light_violet".