Function cc4bFromHexString

#include <Geode/utils/cocos.hpp>geode::Result<cocos2d::ccColor4B>cc4bFromHexString(,
boolrequireAlpha
,
boolpermissive
)

Parse a ccColor4B from a hexadecimal string. The string may contain a leading ‘#’

Parameters

hexValue

The string to parse into a color

requireAlpha

Require the alpha component to be passed. If false, alpha defaults to 255

permissive

If true, strings like "f" are considered valid representations of the color white. Useful for UIs that allow entering a hex color. Empty strings evaluate to pure white
Return value
A ccColor4B if it could be successfully parsed, or an error indicating the failure reason
Examples0