Skip to content

Style Guide

Style files define the complete appearance of tooltips. Each .json file contains 7 config blocks, each controlling a different aspect of the tooltip.

Tip: After modifying a style, use /colortooltips reload to preview changes in-game immediately.

Style Structure Overview

A complete style file structure:

json
{
  "border":      { /* Border color, opacity, flow effect */ },
  "backGround":  { /* Background color, opacity, flow effect */ },
  "titleBar":    { /* Title bar color, height, flow effect */ },
  "itemName":    { /* Item name color change */ },
  "extraToolTip":{ /* Extra tooltip text */ },
  "itemModel":   { /* Item model size */ },
  "animation":   { /* Fade, switch effects, scaling params */ }
}

1. border — Border

Controls the outer border color and dynamic effects.

FieldTypeDefaultDescription
opacityFloat1.0Overall border opacity (0~1)
colorFlowSpeedFloat1.0Color flow speed, 0 = static
colorFlowDirectionString"Clockwise""Clockwise" or "CounterClockwise"
fillColorArraySee belowFill color list, distributed along the border

fillColor entry structure:

json
{
  "color": "@rarityCore",
  "colorModifier": {
    "brightness": 0.0,
    "saturation": 0.0
  }
}
  • color — Color source (see Color Token System below)
  • colorModifier — Color adjustment (optional)
    • brightness — Brightness offset, -1.0 (pure black) to 1.0 (pure white)
    • saturation — Saturation offset, -1.0 (grayscale) to 1.0 (vivid)

When colorFlowSpeed is 0, only the first color in fillColor is used as a static single-color border.

2. backGround — Background

Controls the inner background color and effects.

FieldTypeDefaultDescription
opacityFloat0.8Background opacity (0~1)
colorFlowSpeedFloat0.0Color flow speed, 0 = static
colorFlowDirectionString"TopToDown""TopToDown" / "DownToTop" / "LeftToRight" / "RightToLeft"
fillColorArraySee aboveFill color list, distributed along the direction

3. titleBar — Title Bar

The colored bar at the top of the tooltip, displaying the item icon and name.

FieldTypeDefaultDescription
enabledBooleantrueShow the title bar
twoHeightBooleantruetrue = two-line height (24px), false = single-line (11px)
opacityFloat1.0Title bar opacity
colorFlowSpeedFloat1.0Color flow speed
colorFlowDirectionString"LeftToRight""LeftToRight" or "RightToLeft"
extraOpacityOnRightBooleantrueWhether the right side fades out (gradient transparency)
fillColorArraySee aboveTitle bar color list

If either twoHeight or itemModel.bigSize is enabled, the title bar uses 24px double-line height.

4. itemName — Item Name Color

Controls whether the item name follows rarity colors.

json
{
  "changeColor": {
    "enabled": false,
    "color": "@rarityCore"
  }
}
  • enabled — When true, the item name uses the specified color
  • color — Color source (supports all color tokens, see below)

5. extraToolTip — Extra Tooltip Text

Displays an additional line of text in the tooltip, useful for showing rarity, mod source, etc.

FieldTypeDefaultDescription
enabledBooleanfalseShow extra tooltip text
contentString"@rarityCore"Text content, supports dynamic tokens
contentColorString"@rarityCore"Text color, supports color tokens

Dynamic tokens for content:

TokenResult
@rarityCoreRarityCore localized rarity text (e.g. "⭐ Rare")
@vanillaRarityVanilla rarity name ("Common", "Uncommon"...)
@itemIDItem registry name (e.g. "minecraft:diamond_sword")
@modIDItem's mod ID (e.g. "minecraft")
Other stringDisplayed as-is

6. itemModel — Item Model

Controls the item icon rendering in the title bar.

FieldTypeDefaultDescription
enabledBooleantrueRender the item icon
bigSizeBooleantruetrue = large icon (32px), false = small (16px)

Large icons push the title bar text further right to accommodate the larger icon.

7. animation — Animation Parameters

Controls all animation effects for the tooltip.

itemModel

Item icon scale animations.

json
{
  "switching": { "enabled": true, "startSize": 0.5 },
  "appearing": { "enabled": true, "startSize": 0.5 }
}
  • switching — Scale animation when switching to a different item
  • appearing — Scale animation when the tooltip first appears
  • startSize — Starting scale (0~1), the icon eases from this to normal size

smoothMovement

Tooltip position smoothly follows the cursor.

FieldTypeDefaultDescription
realTimeEnabledBooleantruetrue = smooth easing, false = instant jump
speedFloat1.0Following speed multiplier

smoothScaling

Smooth transition when the tooltip size changes.

FieldTypeDefaultDescription
enabledBooleantrueEnable smooth scaling
speedFloat1.0Scaling speed multiplier

fadeOut

FieldTypeDefaultDescription
enabledBooleantrueEnable fade-out effect
delayInteger500Wait time before fade-out starts (ms)
durationInteger100Fade-out animation duration (ms)

fadeIn

FieldTypeDefaultDescription
enabledBooleantrueEnable fade-in effect
durationInteger100Fade-in animation duration (ms)

switchEffect — Switch Flash

Border flash animation when switching items.

FieldTypeDefaultDescription
enabledBooleantrueEnable flash effect
colorString"@rarityCore"Flash color (supports color tokens)
durationInteger500Flash animation duration (ms)
lengthFloat1.6Flash trail length (higher = longer trail)
segmentationInteger50Trail segments (higher = smoother, more performance cost)

Color Token System

The color field in styles supports three formats:

FormatExampleDescription
@rarityCore"@rarityCore"RarityCore rarity color (requires RarityCore)
@vanillaRarity"@vanillaRarity"Vanilla rarity color: white/yellow/cyan/purple
Hex"A100FF"Fixed color (RRGGBB), # prefix optional (e.g. "#A100FF")

Built-in Styles

NameCharacteristicsBest For
VanillaClean style, @vanillaRarity, titleBar lower opacityGeneral use
VanillaRarityEmphasizes rarity info, extraToolTip shows rarityShowcasing rarity
RarityCoreStylesBased on @rarityCore, richer rarity colorsPaired with RarityCore
RGB8-color rainbow border + title bar, eye-catchingWant flashy effects

Creating Your Own Style

  1. Create a new .json file in config/colortooltips/styles/. The filename becomes the style name.
  2. Write your style content following the structure above. Only include fields you want to change—missing fields will use defaults.
  3. Reference your style name in common.json's styleSelector.
  4. Run /colortooltips reload to apply immediately.

Minimal Style Example

json
{
  "border": {
    "colorFlowSpeed": 0,
    "fillColor": [{ "color": "FF5500" }]
  },
  "backGround": {
    "colorFlowSpeed": 0,
    "fillColor": [{ "color": "FF5500", "colorModifier": { "brightness": -0.9 } }]
  },
  "titleBar": {
    "fillColor": [{ "color": "FF5500" }]
  }
}

This style gives items an orange border and background, static without flow. Save as Orange.json, reference it in styleSelector, and you're done.

Released under the MIT License