---
url: https://cri-middleware.github.io/SSPlayerForWeb/api/@spritestudio/ssplayer-pixi/functions/parsePartOverrideColor.md
---
# Function: parsePartOverrideColor()

> **parsePartOverrideColor**(`raw`): `number` | `null`

Defined in: packages/ssplayer-core/dist/index.d.ts:2875

Parse an author-entered colour into the runtime's packed `0xRRGGBBAA`. Hosts
whose authoring surface only carries text (RPG Maker MZ plugin commands,
TyranoScript tag attributes) need this; accepts `#RGB`, `#RRGGBB`,
`#RRGGBBAA` and the `0x`-prefixed / bare forms of the latter two, defaulting
alpha to opaque. Returns null when it cannot be parsed, so the caller can warn
instead of silently drawing the wrong colour.

## Parameters

### raw

`string`

## Returns

`number` | `null`
