Class in reactor_managers.js

ColorManager

33 functions in 4 groups · hide internal

The Database: everything Core loads at boot.

Familiar territory. ColorManager keeps the RPG Maker MZ API, so existing MZ knowledge, tutorials and plugin code apply. Reactor's additions are marked with descriptions below.

Quick Reference

Setup & Creation 1

loadWindowskin() Loads the windowskin.

Getting Information 3

textColor() Each read is a getImageData allocation plus string building, and windows that redraw every frame ask for many…
itemBackColor1() Item back color1.
itemBackColor2() Item back color2.

Actions 1

clearTextColorCache() Clears the text color cache.

Other 28

legacyTextPaint() Ordinary CSS colours remain the public contract.
readTextColor() Read text color.
normalColor() Normal color.
systemColor() System color.
crisisColor() Crisis color.
deathColor() Death color.
gaugeBackColor() Gauge back color.
hpGaugeColor1() Hp gauge color1.
hpGaugeColor2() Hp gauge color2.
mpGaugeColor1() Mp gauge color1.
mpGaugeColor2() Mp gauge color2.
mpCostColor() Mp cost color.
powerUpColor() Power up color.
powerDownColor() Power down color.
ctGaugeColor1() Ct gauge color1.
ctGaugeColor2() Ct gauge color2.
tpGaugeColor1() Tp gauge color1.
tpGaugeColor2() Tp gauge color2.
tpCostColor() Tp cost color.
pendingColor() Pending color.
hpColor() Hp color.
mpColor() Mp color.
tpColor() Tp color.
paramchangeTextColor() Paramchange text color.
damageColor() Damage color.
outlineColor() Outline color.
dimColor1() Dim color1.
dimColor2() Dim color2.

Setup & Creation

loadWindowskin

static source
ColorManager.loadWindowskin()

Loads the windowskin. (Same as the RPG Maker MZ method of this name.)

Getting Information

textColor

static source
ColorManager.textColor(n)

Each read is a getImageData allocation plus string building, and windows that redraw every frame ask for many colors per row — the victory gauge count-up alone runs about ten per actor per frame, which is enough steady allocation to show up as periodic hitching.

Details

Each read is a getImageData allocation plus string building, and windows that redraw every frame ask for many colors per row — the victory gauge count-up alone runs about ten per actor per frame, which is enough steady allocation to show up as periodic hitching. The palette is fixed once the skin has loaded, so cache per skin instance; swapping skins (or reloading one) replaces the instance and drops the cache with it.

itemBackColor1

static source
ColorManager.itemBackColor1()

Item back color1. (Same as the RPG Maker MZ method of this name.)

itemBackColor2

static source
ColorManager.itemBackColor2()

Item back color2. (Same as the RPG Maker MZ method of this name.)

Actions

clearTextColorCache

static source
ColorManager.clearTextColorCache()

Clears the text color cache. (Same as the RPG Maker MZ method of this name.)

Other

legacyTextPaint

static source
ColorManager.legacyTextPaint(index)

Ordinary CSS colours remain the public contract.

Details

Ordinary CSS colours remain the public contract. A window explicitly carries its palette index separately so duplicate sampled colours still select different gradients, and a plugin's custom CSS stays a flat colour.

readTextColor

static source
ColorManager.readTextColor(n)

Read text color. (Same as the RPG Maker MZ method of this name.)

normalColor

static source
ColorManager.normalColor()

Normal color. (Same as the RPG Maker MZ method of this name.)

systemColor

static source
ColorManager.systemColor()

System color. (Same as the RPG Maker MZ method of this name.)

crisisColor

static source
ColorManager.crisisColor()

Crisis color. (Same as the RPG Maker MZ method of this name.)

deathColor

static source
ColorManager.deathColor()

Death color. (Same as the RPG Maker MZ method of this name.)

gaugeBackColor

static source
ColorManager.gaugeBackColor()

Gauge back color. (Same as the RPG Maker MZ method of this name.)

hpGaugeColor1

static source
ColorManager.hpGaugeColor1()

Hp gauge color1. (Same as the RPG Maker MZ method of this name.)

hpGaugeColor2

static source
ColorManager.hpGaugeColor2()

Hp gauge color2. (Same as the RPG Maker MZ method of this name.)

mpGaugeColor1

static source
ColorManager.mpGaugeColor1()

Mp gauge color1. (Same as the RPG Maker MZ method of this name.)

mpGaugeColor2

static source
ColorManager.mpGaugeColor2()

Mp gauge color2. (Same as the RPG Maker MZ method of this name.)

mpCostColor

static source
ColorManager.mpCostColor()

Mp cost color. (Same as the RPG Maker MZ method of this name.)

powerUpColor

static source
ColorManager.powerUpColor()

Power up color. (Same as the RPG Maker MZ method of this name.)

powerDownColor

static source
ColorManager.powerDownColor()

Power down color. (Same as the RPG Maker MZ method of this name.)

ctGaugeColor1

static source
ColorManager.ctGaugeColor1()

Ct gauge color1. (Same as the RPG Maker MZ method of this name.)

ctGaugeColor2

static source
ColorManager.ctGaugeColor2()

Ct gauge color2. (Same as the RPG Maker MZ method of this name.)

tpGaugeColor1

static source
ColorManager.tpGaugeColor1()

Tp gauge color1. (Same as the RPG Maker MZ method of this name.)

tpGaugeColor2

static source
ColorManager.tpGaugeColor2()

Tp gauge color2. (Same as the RPG Maker MZ method of this name.)

tpCostColor

static source
ColorManager.tpCostColor()

Tp cost color. (Same as the RPG Maker MZ method of this name.)

pendingColor

static source
ColorManager.pendingColor()

Pending color. (Same as the RPG Maker MZ method of this name.)

hpColor

static source
ColorManager.hpColor(actor)

Hp color. (Same as the RPG Maker MZ method of this name.)

mpColor

static source
ColorManager.mpColor(/*actor*/)

Mp color. (Same as the RPG Maker MZ method of this name.)

tpColor

static source
ColorManager.tpColor(/*actor*/)

Tp color. (Same as the RPG Maker MZ method of this name.)

paramchangeTextColor

static source
ColorManager.paramchangeTextColor(change)

Paramchange text color. (Same as the RPG Maker MZ method of this name.)

damageColor

static source
ColorManager.damageColor(colorType)

Damage color. (Same as the RPG Maker MZ method of this name.)

outlineColor

static source
ColorManager.outlineColor()

Outline color. (Same as the RPG Maker MZ method of this name.)

dimColor1

static source
ColorManager.dimColor1()

Dim color1. (Same as the RPG Maker MZ method of this name.)

dimColor2

static source
ColorManager.dimColor2()

Dim color2. (Same as the RPG Maker MZ method of this name.)