Class "Color"⚓︎
Info
This class can be accessed using its constructor:
Example Code
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 )⚓︎
All arguments are now optional. Colorize
can now be set through the constructor.
Functions⚓︎
GetColorize ()⚓︎
table GetColorize ( )⚓︎
Returns a table corresponding to the color's current Colorize values: {R, G, B, A}
GetOffset ()⚓︎
table GetOffset ( )⚓︎
Returns a table corresponding to the color's current Offset values: {R, G, B}
While the Color class does already contain .RO, .GO and .BO variables for this, GetOffset() has been measured to be ~30% faster in cases where access to all three values is necessary and is recommended in that scenario as a result. Performance is near identical when accessing two variables, and worse when accessing one. In cases where only one or two offset values are needed, stick with the variables.
GetTint ()⚓︎
table GetTint ( )⚓︎
Returns a table corresponding to the color's current Tint values: {R, G, B, A}
Print ()⚓︎
string Print ( )⚓︎
Returns a string representation of the color object.
__tostring ()⚓︎
string __tostring ( )⚓︎
Creates a string representation of the color object.
This enables direct printing of the object by doing print(myColorObj)
Constants⚓︎
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_PUKE
s 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_NORMAL
s 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_NORMAL
s 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_NORMAL
s 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_NORMAL
s 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_NORMAL
s 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_NORMAL
s 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_NORMAL
s 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_NORMAL
s 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_HUSH
s 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_HUSH
s 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_HUSH
s 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_NORMAL
s 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_NORMAL
s 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_NORMAL
s 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_NORMAL
s 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_NORMAL
s 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)