Skip to content

Hex

hexToColor(hexString, alpha?): Readonly<Color>

Defined in: packages/isaacscript-common/src/functions/hex.ts:11

Converts a hex string like “#33aa33” to a KColor object.

string

A hex string like “#ffffff” or “ffffff”. (The “#” character is optional.)

number = 1

Optional. Range is from 0 to 1. Default is 1. (The same as the Color constructor.)

Readonly<Color>


hexToKColor(hexString, alpha?): Readonly<KColor>

Defined in: packages/isaacscript-common/src/functions/hex.ts:25

Converts a hex string like “#33aa33” to a Color object.

string

A hex string like “#ffffff” or “ffffff”. (The “#” character is optional.)

number = 1

Range is from 0 to 1. Default is 1.

Readonly<KColor>