ProtoFlux:Color To Hex Code: Difference between revisions

From Resonite Wiki
Created page with " {{#Invoke:ProtoFlux|GenerateUI |Name=Color To Hex Code |Category=Colors |Inputs= [ {"Name":"Color", "Type":"color"}, {"Name":"ShortForm", "Type":"bool"}, {"Name":"IncludeAlpha", "Type":"bool"}, {"Name":"Prefix", "Type":"String"} ] |Outputs= [ {"Name":"*", "Type":"String"} ] |}} Color To Hex Code converts a Color to a string [https://en.wikipedia.org/wiki/Web_colors hex color code] such as "#FFAABC". == Inputs == === Color (Color) === Th..."
 
the bug was patched a while ago part 2
 
Line 27: Line 27:


If true, convert to a short form such as "#FAC" instead of "#FFAACC".
If true, convert to a short form such as "#FAC" instead of "#FFAACC".
This is currently bugged and produces incorrect results.<ref>{{CiteResoniteIssue|384|Short Form ColorX to Hex code not working correctly}}</ref>


=== IncludeAlpha ([[Type:Bool|Bool]]) ===
=== IncludeAlpha ([[Type:Bool|Bool]]) ===

Latest revision as of 21:42, 17 April 2025

Color To Hex Code
Color
*
ShortForm
IncludeAlpha
Prefix
Colors

Color To Hex Code converts a Color to a string hex color code such as "#FFAABC".

Inputs

Color (Color)

The color to convert. Color components are clamped to the range 0-1.

ShortForm (Bool)

If true, convert to a short form such as "#FAC" instead of "#FFAACC".

IncludeAlpha (Bool)

If true, include the alpha channel as the last component.

Prefix (String)

The string to prefix the color code with. Defaults to "#".

Outputs

* (String)

The resulting hex code.

Gallery

References