Skip to content

Simple red4ext-rs example to add a color hex string to rgba converter.

License

Notifications You must be signed in to change notification settings

cyb3rpsych0s1s/colorconverter

Repository files navigation

color converter

Cyberpunk 2077 version compatibility build

A small example at adding a native func in Redscript to calculate RGBA from a hex string.

build

Both Rust toolchain and Justfile command runner must be pre-installed.

Build binary:

just build

Binary will be built into red4ext\plugins\colorconverter\colorconverter.dll. Don't forget to also place r6\scripts\ColorConverter\Native.reds in your game folder :)

usage

let color: Color = ColorHexToRgba("FF0000");
let color: Color = ColorHexToRgba("#ff00007f");
let color: Color = ColorHexToRgba("aliceblue");

It supports any input accepted by csscolorparser.

About

Simple red4ext-rs example to add a color hex string to rgba converter.

Resources

License

Stars

Watchers

Forks

Packages

No packages published