Skip to content

Class "Color"⚓︎

Info

可以通过其构造函数访问此类:

Example Code
1
local redColor = Color(1,0,0,1)

Modified Constructors⚓︎

Color ()⚓︎

Color Color ( float R = 1, float G = 1, float B = 1, float A = 1, float RO = 0, float GO = 0, float BO = 0, float RC = 0, float GC = 0, float BC = 0, float AC = 0 )⚓︎

所有参数现在都是可选的。现在可以通过构造函数设置 Colorize


GetColorize ()⚓︎

table GetColorize ( )⚓︎

返回一个表格,对应颜色当前的 Colorize 值:{R, G, B, A}


GetOffset ()⚓︎

table GetOffset ( )⚓︎

返回一个表格,对应颜色当前的 Offset 值:{R, G, B} 虽然 Color 类已经包含了用于此目的的 .RO.GO.BO 变量,但在需要访问所有三个值的情况下,GetOffset() 的速度被测量为快约 30%,因此在这种情况下建议使用它。当访问两个变量时,性能几乎相同;当访问一个变量时,性能更差。在只需要一个或两个偏移值的情况下,请继续使用变量。


GetTint ()⚓︎

table GetTint ( )⚓︎

返回一个表格,对应颜色当前的 Tint 值:{R, G, B, A}


Print ()⚓︎

string Print ( )⚓︎

返回颜色对象的字符串表示形式。


__tostring ()⚓︎

string __tostring ( )⚓︎

这允许通过 print(myColorObj) 直接打印对象。 创建颜色对象的字符串表示形式。


Constants⚓︎

译者注⚓︎

下方函数均为修改实体/激光/泪弹为对应某道具的颜色

例如Color.LaserAlmond为将激光设为拥有道具杏仁奶时的颜色。

因此,如有需要,请前往以撒Wiki查找想要颜色的道具英文名称后来本界面搜索


Color.EmberFade⚓︎

Color EmberFade⚓︎

Used for enemies like Crackles and Coal Spiders. This color has a hardcoded special property; gibs start orange and fade into grey.

Info

Color of (0, 0, 0, 1.1)

Colorize of (0, 0, 0, 0)

Offset of (1, 0.514, 0.004)


Color.LaserAlmond⚓︎

Color LaserAlmond⚓︎

Used for lasers with the Almond Milk effect.

Info

Color of (1, 1, 1, 1)

Colorize of (5.6, 5.2, 3.8, 1)

Offset of (0, 0, 0)


Color.LaserChocolate⚓︎

Color LaserChocolate⚓︎

Used for lasers with the Chocolate Milk effect.

Info

Color of (1, 1, 1, 1)

Colorize of (3, 1.7, 1.7, 1)

Offset of (0, 0, 0)


Color.LaserCoal⚓︎

Color LaserCoal⚓︎

Used for lasers with the A Lump of Coal effect.

Info

Color of (3, 3, 3, 1)

Colorize of (1.3, 1.2, 1.2, 1)

Offset of (-0.5, -0.5, -0.5)


Color.LaserFireMind⚓︎

Color LaserFireMind⚓︎

Used for lasers fired by players with Fire Mind.

Info

Color of (1, 1, 1, 1)

Colorize of (5, 3, 1, 1)

Offset of (0, 0, 0)


Color.LaserHoming⚓︎

Color LaserHoming⚓︎

Used for homing lasers.

Info

Color of (1, 1, 1, 1)

Colorize of (3, 1, 3.5, 0)

Offset of (0, 0, 0)


Color.LaserIpecac⚓︎

Color LaserIpecac⚓︎

Used for lasers with the Ipecac effect.

Info

Color of (1, 1, 1, 1)

Colorize of (1.8, 3, 1, 1)

Offset of (0, 0, 0)


Color.LaserMother⚓︎

Color LaserMother⚓︎

Used for Mother's mega laser.

Info

Color of (1, 1, 1, 1)

Colorize of (2, 2.2, 1, 1)

Offset of (0, 0, 0)


Color.LaserNumberOne⚓︎

Color LaserNumberOne⚓︎

Used for lasers fired by players with Number One.

Info

Color of (1, 1, 1, 1)

Colorize of (5, 4.9, 1, 1)

Offset of (0, 0, 0)


Color.LaserSoy⚓︎

Color LaserSoy⚓︎

Used for lasers with the Soy Milk effect.

Info

Color of (1, 1, 1, 1)

Colorize of (5.6, 5, 4.2, 1)

Offset of (0, 0, 0)


Color.LaserPoison⚓︎

Color LaserPoison⚓︎

Used for poisonous lasers fired by players with items like Scorpio or Common Cold.

Info

Color of (1, 1, 1, 1)

Colorize of (1.8, 4, 1, 1)

Offset of (0, 0, 0)


Color.ProjectileCageBlue⚓︎

Color ProjectileCageBlue⚓︎

Used for ProjectileVariant.PROJECTILE_PUKEs fired by The Cage.

Info

Color of (1, 1, 1, 1)

Colorize of (0.8, 1, 0.85, 1)

Offset of (0, 0, 0)


Color.ProjectileCorpseClusterDark⚓︎

Color ProjectileCorpseClusterDark⚓︎

Used for clustered ProjectileVariant.PROJECTILE_NORMALs fired in Corpse by enemies like Mother.

Info

Color of (1, 1, 1, 1)

Colorize of (0.63, 0.85, 0.32, 0)

Offset of (0, 0, 0)


Color.ProjectileCorpseClusterLight⚓︎

Color ProjectileCorpseClusterLight⚓︎

Used for clustered ProjectileVariant.PROJECTILE_NORMALs fired in Corpse by enemies like Mother.

Info

Color of (1, 1, 1, 1)

Colorize of (0.63, 0.85, 0.32, 0)

Offset of (0, 0, 0)


Color.ProjectileCorpseGreen⚓︎

Color ProjectileCorpseGreen⚓︎

Used for green ProjectileVariant.PROJECTILE_NORMALs fired in Corpse by enemies like Mother.

Also used for the green laser fired by Chimera.

Info

Color of (1, 1, 1, 1)

Colorize of (1.5, 2, 1, 1)

Offset of (0, 0, 0)


Color.ProjectileCorpsePink⚓︎

Color ProjectileCorpsePink⚓︎

Used for pink-ish white-ish ProjectileVariant.PROJECTILE_NORMALs fired in Corpse by enemies like Mother.

Info

Color of (1, 1, 1, 1)

Colorize of (4, 3.5, 3.2, 1)

Offset of (0, 0, 0)


Color.ProjectileCorpseWhite⚓︎

Color ProjectileCorpseWhite⚓︎

Used for white-ish grey-ish ProjectileVariant.PROJECTILE_NORMALs fired in Corpse by enemies like Mother.

Info

Color of (1, 1, 1, 1)

Colorize of (2.7, 3, 2, 1)

Offset of (0, 0, 0)


Color.ProjectileCorpseYellow⚓︎

Color ProjectileCorpseYellow⚓︎

Used for yellow ProjectileVariant.PROJECTILE_NORMALs fired in Corpse by enemies like The Scourge.

Info

Color of (1, 1, 1, 1)

Colorize of (3.5, 2.5, 1, 1)

Offset of (0, 0, 0)


Color.ProjectileFireWave⚓︎

Color ProjectileFireWave⚓︎

Used for fire-pillar-wave-spawning ProjectileVariant.PROJECTILE_NORMALs fired by enemies like Crackle.

Info

Color of (1, 1, 1, 1)

Colorize of (0, 0, 0, 0)

Offset of (1, 0.3, 0)


Color.ProjectileHoming⚓︎

Color ProjectileHoming⚓︎

Used for homing ProjectileVariant.PROJECTILE_NORMALs fired by enemies like Psychic Maw.

Info

Color of (1, 1, 1, 1)

Colorize of (0.8, 0.15, 1, 1)

Offset of (0.26, 0.05, 0.4)


Color.ProjectileHushBlue⚓︎

Color ProjectileHushBlue⚓︎

Used for blue ProjectileVariant.PROJECTILE_HUSHs fired by Hush.

Info

Color of (1, 1, 1, 1)

Colorize of (0, 0, 0, 0)

Offset of (0, 0.2, 0.4)


Color.ProjectileHushGreen⚓︎

Color ProjectileHushGreen⚓︎

Used for blue ProjectileVariant.PROJECTILE_HUSHs fired by Hush.

Info

Color of (1, 1, 1, 1)

Colorize of (0, 0, 0, 0)

Offset of (0.2, 0.2, 0)


Color.ProjectileHushYellow⚓︎

Color ProjectileHushYellow⚓︎

Used for blue ProjectileVariant.PROJECTILE_HUSHs fired by Hush.

Info

Color of (1, 1, 1, 1)

Colorize of (0, 0, 0, 0)

Offset of (0.4, 0.2, 0)


Color.ProjectileIpecac⚓︎

Color ProjectileIpecac⚓︎

Used for explosive ProjectileVariant.PROJECTILE_NORMALs fired by enemies like Gurgles.

Info

Color of (1, 1, 1, 1)

Colorize of (0.4, 2, 0.5, 1)

Offset of (0, 0, 0)


Color.ProjectileMegaSatanBlack⚓︎

Color ProjectileMegaSatanBlack⚓︎

Used for black ProjectileVariant.PROJECTILE_NORMALs fired by Mega Satan.

Info

Color of (1, 1, 1, 1)

Colorize of (0.6, 0.6, 0.6, 1)

Offset of (0, 0, 0)


Color.ProjectileMegaSatanWhite⚓︎

Color ProjectileMegaSatanWhite⚓︎

Used for white ProjectileVariant.PROJECTILE_NORMALs fired by Mega Satan.

Info

Color of (1, 1, 1, 1)

Colorize of (2, 2, 2, 1)

Offset of (0, 0, 0)


Color.ProjectileSoy⚓︎

Color ProjectileSoy⚓︎

Used for soy ProjectileVariant.PROJECTILE_NORMALs fired by enemies like Soy Creep.

Info

Color of (1, 1, 1, 1)

Colorize of (1, 1, 1, 1)

Offset of (0.8, 0.7, 0.5)


Color.ProjectileTar⚓︎

Color ProjectileTar⚓︎

Used for tar ProjectileVariant.PROJECTILE_NORMALs fired by enemies like Clot.

Info

Color of (1, 1, 1, 1)

Colorize of (0.5, 0.5, 0.5, 1)

Offset of (0, 0, 0)


Color.TearAlmond⚓︎

Color TearAlmond⚓︎

Used for tears fired by players with Soy Milk.

Info

Color of (1.8, 1.7, 1, 1)

Colorize of (0, 0, 0, 0)

Offset of (0, 0, 0)


Color.TearChocolate⚓︎

Color TearChocolate⚓︎

Used for tears fired by players with Chocolate Milk.

Info

Color of (0.33, 0.18, 0.18, 1)

Colorize of (0, 0, 0, 0)

Offset of (0.258824, 0.156863, 0.156863)


Color.TearCoal⚓︎

Color TearCoal⚓︎

Used for tears fired by players with A Lump of Coal.

Info

Color of (0.2, 0.09, 0.065, 1)

Colorize of (0, 0, 0, 0)

Offset of (0, 0, 0)


Color.TearCommonCold⚓︎

Color TearCommonCold⚓︎

Used for poison tears fired by players with Common Cold.

Info

Color of (0.4, 0.97, 0.5, 1)

Colorize of (0, 0, 0, 0)

Offset of (0, 0, 0)


Color.TearHoming⚓︎

Color TearHoming⚓︎

Used for homing tears fired by players with Spoon Bender.

Info

Color of (0.4, 0.15, 0.38, 1)

Colorize of (0, 0, 0, 0)

Offset of (0.278431, 0, 0.454902)


Color.TearIpecac⚓︎

Color TearIpecac⚓︎

Used for explosive tears fired by players with Ipecac.

Info

Color of (0.5, 0.9, 0.4, 1)

Colorize of (0, 0, 0, 0)

Offset of (0, 0, 0)


Color.TearNumberOne⚓︎

Color TearNumberOne⚓︎

Used for tears fired by players with Number One.

Info

Color of (1, 1, 0, 1)

Colorize of (0, 0, 0, 0)

Offset of (0.176471, 0.0588235, 0)


Color.TearScorpio⚓︎

Color TearScorpio⚓︎

Used for poison tears fired by players with Scorpio.

Info

Color of (0.196078, 1, 0.196078, 1)

Colorize of (0, 0, 0, 0)

Offset of (0, 0, 0)


Color.TearSerpentsKiss⚓︎

Color TearSerpentsKiss⚓︎

Used for poison tears fired by players with Serpent's Kiss.

Info

Color of (0.5, 0.97, 0.5, 1)

Colorize of (0, 0, 0, 0)

Offset of (0, 0, 0)


Color.TearSoy⚓︎

Color TearSoy⚓︎

Used for tears fired by players with Soy Milk.

Info

Color of (1.5, 2, 2, 1)

Colorize of (0, 0, 0, 0)

Offset of (0, 0, 0)


Color.TearTar⚓︎

Color TearTar⚓︎

Used for tar tears fired by familiars like Little Gish.

Info

Color of (0.95, 0.8, 0.6, 1)

Colorize of (0, 0, 0, 0)

Offset of (-0.588235, -0.588235, -0.588235)