Overview
Kore provides a unified Color
API that covers three families of colors used by Minecraft:
FormattingColor
andBossBarColor
(named colors for chat, UI, teams, etc.)RGB
andARGB
(numeric colors)DyeColors
(the 16 dye colors used by entities and items)
For the vanilla reference on color behavior, see the Minecraft Wiki’s Color page (https://minecraft.wiki/w/Color
).
Color types in Kore
Color
(sealed interface): umbrella type accepted by most helpers.FormattingColor
: named chat/formatting colors (e.g.Color.RED
,Color.AQUA
).BossBarColor
: bossbar’s named colors.RGB
/ARGB
: numeric colors.RGB
is#rrggbb
,ARGB
is#aarrggbb
.DyeColors
: 16 dye colors (white, orange, magenta, …, black) for collars, shulkers, sheep, tropical fish, etc.
Helpers to create numeric colors:
Conversions and utils:
Serialization formats by context
Different Minecraft systems expect colors in different formats. Kore picks the right format automatically via serializers.
-
Chat components (
color
,shadow_color
): string- Named colors emit lowercase names (e.g.
"red"
). RGB
emits"#rrggbb"
;ARGB
emits"#aarrggbb"
.
- Named colors emit lowercase names (e.g.
-
Item components (decimal ints):
dyedColor(..)
: decimal (or object withrgb
decimal when tooltip flag is present) See on GitHubmapColor(..)
: decimal See on GitHubpotionContents(customColor=..)
: decimal See on GitHub- Firework explosion
colors
/fade_colors
: decimal list See on GitHub
-
Worldgen Biomes (decimal ints): See on GitHub
-
Particles:
- Command particles (decimal ints): Dust, DustColorTransition, Trail See on GitHub See on GitHub See on GitHub
- Enchantment effect particles (double arrays
[r, g, b]
in 0..1): See on GitHub See on GitHub See on GitHub
-
UI and commands using named colors (strings):
- Teams, Scoreboards, Bossbar:
FormattingColor
/BossBarColor
See on GitHub See on GitHub
- Teams, Scoreboards, Bossbar:
Dye colors and where they’re used
DyeColors
are used for entity variants and certain item/entity data components:
catCollar(..)
,wolfCollar(..)
,sheepColor(..)
,shulkerColor(..)
See on GitHub See on GitHub See on GitHub See on GitHub
Practical examples
Chat components (string serialization):
Dyed leather color (decimal serialization):
Map color (decimal serialization):
Fireworks (decimal lists):
Biome effects (decimal):
Particles
-
Command dust (decimal):
-
Enchantment dust (double array):
Entity variant dye usage:
Notes
- Passing
Color
to component helpers that use decimal or double-array formats is safe: Kore converts automatically viatoRGB()
. - Use
DyeColors
when the game mechanic expects a dye color (collars, sheep, shulkers, tropical fish), andFormattingColor
/BossBarColor
for chat/UI tints.
Further reading
- Minecraft Wiki — Color:
https://minecraft.wiki/w/Color